CreateTypedArray problem

Discussion in 'AutoCAD' started by amartim, Jul 6, 2004.

  1. amartim

    amartim Guest

    Hi, I am getting "type mismatch" error when I try to retrieve a value from the vector. Can anyone help me?

    I am using vbscript, IE6, Autocad2002

    regards

    <SCRIPT LANGUAGE="VBScript">
    Dim AcadObj
    Dim AcadDoc
    Dim AcadUtility

    set AcadObj = createobject("AutoCAD.Application")
    Set AcadDoc = AcadObj.ActiveDocument
    Set AcadUtility = AcadDoc.Utility
    Dim Point1
    Dim Point2
    dim a
    AcadUtility.CreateTypedArray Point1, vbDouble, 19.8161,19.7178,0
    AcadUtility.CreateTypedArray Point2, vbDouble, 19.8161,18.7178,0

    'the code below does not work. why?
    a= point1(1)

    ' the code below works
    AcadObj.Application.ZoomWindow point1, point2
    </script>
     
    amartim, Jul 6, 2004
    #1
  2. amartim

    john m Guest

    is it because the array is zero based?
    do you really want
    a=point1(0)

    just wondering

    JM


    the vector. Can anyone help me?
     
    john m, Jul 7, 2004
    #2
  3. amartim

    amartim Guest

    No, it did not work :-(

    I use Ubound and it returns me 2
    I use typename(point1) and it returns me DOUBLE

    I use any operation over point1 or point1(n) and I get mismatch error

    Alessandro
     
    amartim, Jul 7, 2004
    #3
Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments (here). After that, you can post your question and our members will help you out.