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??
Solved! Go to Solution.
Solved by dbroad. Go to Solution.
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)
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!
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.
"Safearrays and object types" That's a whole nuther can of worms I don't feel like dealing with right now.
I have done a little VBA for Excel so I understand the object type thing but safearrays are ... like that airplane joke.