VL ucs help needed
CADForums.net Forum Index CADForums.net
Discussion of AutoCAD and other CAD software.
 
 FAQFAQ   MemberlistMemberlist     RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 
 
Google
 
Web cadforums.net
VL ucs help needed

 
Post new topic   Reply to topic    CADForums.net Forum Index -> Customization
Author Message
BillZ
Guest





Posted: Thu Dec 23, 2004 8:49 pm    Post subject: VL ucs help needed Reply with quote

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

Back to top
R. Robert Bell
Guest





Posted: Thu Dec 23, 2004 11:51 pm    Post subject: Re: VL ucs help needed Reply with quote

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@jiveforum2.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
Back to top
BillZ
Guest





Posted: Tue Dec 28, 2004 4:44 pm    Post subject: Re: VL ucs help needed Reply with quote

Thanks Robert,

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


Bill

Back to top
 
Post new topic   Reply to topic    CADForums.net Forum Index -> Customization All times are GMT
Page 1 of 1

 
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum




Windows Server DSP VoIP Electronics New Topics
Powered by phpBB