Visual LISP, AutoLISP and General Customization
cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

(vla-...) syntax?

4 REPLIES 4
SOLVED
Reply
Message 1 of 5
bgingerich
471 Views, 4 Replies

(vla-...) syntax?

This has been brought up in a few different threads.  However, they were all about one specific command and I could not find or (more likely) did not understand how to find the syntax for (vla-...) commands.  What I'm looking for is a way to go from the vba reference material to a (vla..), but maybe that's not where I should be looking??

─────────────────────────────────────────────────────────────────────────────────────────────
Brandon Gingerich
4 REPLIES 4
Message 2 of 5
dbroad
in reply to: bgingerich

Briefly

 

VBA syntax:  object.method(args..)

VLA syntax: (vla-method object args...)

VLAX syntax (vlax-invoke object 'method args...)

 

VBA syntax for setting a property(roughly): object.property = value

VLA syntax: (vla-put-property object value)

VLAX syntax: (vlax-put object 'property value)

 

VBA syntax for getting a property: variable = object.property

VLA syntax:  (vla-get-property object)

VLAX syntax: (vlax-get object 'property)

Architect, Registered NC, VA, SC, & GA.
Message 3 of 5
bgingerich
in reply to: dbroad

Thanks a bunch!!!  I might have been able to figure it outeventually comparing the various (vla- commands here in the forums with the VBA documentation, but it probably would have taken forever!  Hopefully this will help others like me who am trying to learn the (vla- extensions. 

 

Thanks again for such a clear answer!

─────────────────────────────────────────────────────────────────────────────────────────────
Brandon Gingerich
Message 4 of 5
dbroad
in reply to: bgingerich

You're welcome.  Glad to help.  There are also a couple of other vlax syntaxes but the ones I listed are the ones I use most often.  Others include vlax-get-property, vlax-put-property, and vlax-invoke-method. I don't use those as much because they require the values (most of the time) to be variants with points being safe-arrays.

Architect, Registered NC, VA, SC, & GA.
Message 5 of 5
bgingerich
in reply to: dbroad

"Safearrays and object types"  That's a whole nuther can of worms I don't feel like dealing with right now.  Smiley Wink

 

I have done a little VBA for Excel so I understand the object type thing but safearrays are ... like that airplane joke.

─────────────────────────────────────────────────────────────────────────────────────────────
Brandon Gingerich

Can't find what you're looking for? Ask the community or share your knowledge.

Post to forums  

Autodesk Design & Make Report

”Boost