Results 1 to 3 of 3

Thread: VL ucs help needed

  1. #1
    BillZ Guest

    VL ucs help needed

    R2005:

    I'm trying to figure out when to use ActiveX functions or the regular autolisp.
    I start my program with:
    (vla-InitializeUserInput Util 1)
    (setq CenObj (vla-GetPoint Util nil "Center Point: ")
    )
    which returns a vla object.

    then later in the program I need to create a new UCS with vla-add and the origin and x and y axis need a variant array of doubles.
    I want to use CenObj as the origin and get the x&y axis from there (basically a 90d x axis from the origin).
    Do I have to get the variant value of the coordiante of CenObj and the do a polar for the x axis point then figure the y axis point too?
    And why do some vl functions return an object and some an iteger or real like the following?
    (vla-InitializeUserInput Util 7)
    (setq RadDis (vla-GetDistance Util CenObj "Radius Distance: ")
    )

    Just seems like so much more code than plain autolisp was to accomplish the same objective.

    I'm just learning VL so bear with me here.

    TIA

    Bill

  2. #2
    R. Robert Bell Guest
    Bill,

    There is no compelling reason to use the Utility object's methods in Visual
    LISP. The Utility object was provided to VBA programmers to provide them
    with similar methods to AutoLISP functions. In fact, the object's methods
    have some quirks compared to the AutoLISP functions.

    However, I do prefer to use the ActiveX objects when creating/modifying the
    drawing where possible.

    Also, the UCS object has some quirks of its own, just thought I'd warn you.
    <vbg>

    --
    R. Robert Bell


    "BillZ" <nospam@address.withheld> wrote in message
    news:16732961.1103816993533.JavaMail.jive@jiveforu m2.autodesk.com...
    R2005:

    I'm trying to figure out when to use ActiveX functions or the regular
    autolisp.
    I start my program with:
    (vla-InitializeUserInput Util 1)
    (setq CenObj (vla-GetPoint Util nil "Center Point: ")
    )
    which returns a vla object.

    then later in the program I need to create a new UCS with vla-add and the
    origin and x and y axis need a variant array of doubles.
    I want to use CenObj as the origin and get the x&y axis from there
    (basically a 90d x axis from the origin).
    Do I have to get the variant value of the coordiante of CenObj and the do a
    polar for the x axis point then figure the y axis point too?
    And why do some vl functions return an object and some an iteger or real
    like the following?
    (vla-InitializeUserInput Util 7)
    (setq RadDis (vla-GetDistance Util CenObj "Radius Distance: ")
    )

    Just seems like so much more code than plain autolisp was to accomplish the
    same objective.

    I'm just learning VL so bear with me here.

    TIA

    Bill

  3. #3
    BillZ Guest
    Thanks Robert,

    I had my suspicions about this.
    Thanks for the clarification. :)


    Bill

Similar Threads

  1. Advice needed
    By Jan in forum AutoCAD
    Replies: 7
    Last Post: 04-16-2005, 03:23 PM
  2. 65nm help needed
    By in forum Cadence
    Replies: 0
    Last Post: 04-14-2005, 10:24 PM
  3. Softengine 4.0 needed !!
    By in forum AutoCAD
    Replies: 8
    Last Post: 03-25-2005, 01:41 PM
  4. Objectdcl.com Help needed if possible
    By Vxc in forum Customization
    Replies: 21
    Last Post: 02-17-2005, 02:30 PM
  5. Help Needed
    By Kenny Poong in forum Customization
    Replies: 5
    Last Post: 01-14-2005, 12:25 AM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Other forums: Access Forum - Microsoft Office Forum - Exchange Server Forum