Visual Basic to Visual FOX

Discussion in 'AutoCAD' started by jorgematheus, Jan 22, 2004.

  1. jorgematheus

    jorgematheus Guest

    Hi

    I can some help me out here. I'm trying to
    convert a Visual Basic to Visual FOX 6.0

    Why Visual Fox? Because i have a large project
    allready developed, and i will continue to developed
    in Visual FOX. Solving this small example will help
    me with a buggers ones.

    I have this

    ' Create the line
    Dim lineObj As AcadLine
    Dim startPoint(0 To 2) As Double
    Dim endPoint(0 To 2) As Double
    startPoint(0) = 1#: startPoint(1) = 1#: startPoint(2) = 0#
    endPoint(0) = 4#: endPoint(1) = 4#: endPoint(2) = 0#
    Set lineObj = ThisDrawing.ModelSpace.AddLine(startPoint, endPoint)

    in fox i have

    on error uno=getobject("","Autocad.application")
    uno=getobject(,"Autocad.application")
    on error
    acadDoc = uno.ActiveDocument
    DIMENSION KK(3),KK2(3)
    KK(1)=1.0
    KK(2)=1.0
    KK(3)=0.0
    KK2(1)=4.0
    KK2(2)=4.0
    KK2(3)=0.0
    KK4=ACADDOC.MODELSPACE.ADDLINE(KK,KK2)

    The las line gave me a Incorrect Parameters ERROR.


    Thank a lot
     
    jorgematheus, Jan 22, 2004
    #1
  2. Well incorrect parameters would imply incorrect data type. AutoCAD
    expects a double so you'd need the equivalent in FOX. Sorry but I'm not
    familiar with FOX so I have no idea what data type you need to use.
    ___________________________
    Mike Tuersley
    CADalyst's AutoCAD Clinic
    Rand IMAGINiT Technologies
     
    Mike Tuersley, Jan 22, 2004
    #2
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.