Message 1 of 11
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report
Vla vlax vl commands.
There is a list of these commands..
But no help file or examples ?
Thanks.
Solved! Go to Solution.
Vla vlax vl commands.
There is a list of these commands..
But no help file or examples ?
Thanks.
Solved! Go to Solution.
Not sure how did you search for them.
I usually select "Develope" from the pull-down menu from the HELP browser panel, as shown below:
Where did you click for that ? Where is the help browser panel ?
I have acad E 2015 and when i click here :
On developer, I get acad electrical 2015 help but not for lisp just for AE.
On Online Dev.Cent., I get A. Dev. Network.
On API a local help file without vla commands.
But not the window you showed.
With Acada2012, in the developer help (acad_alg.chm) is a lot ActiveX methodology, and even huge examples like this :
(setq myCircle ; Prompt for the center point and radius: (progn (setq ctrPt (getpoint "\nCircle center point: ") radius (distance ctrPt (getpoint ctrpt "\nRadius: ") ) ) ; Add a circle to the drawing model space. Nest the function ; calls to obtain the path to the current drawing's model ; space: AcadObject > ActiveDocument > ModelSpace (vla-addCircle (vla-get-ModelSpace (vla-get-ActiveDocument (vlax-get-acad-object)) ) (vlax-3d-point ctrPt) radius ) ) )
But in the lisp functions (acad_alr.chm) the example lisp is smal or like this, a 1 line example :
_$ (setq stuff (list "a" "b" "c" "d" "e")) ("a" "b" "c" "d" "e") _$ (vl-position "c" stuff) 2
But no help of vla commands, only vl/vlax and vlr, I was looking for vla-get-invisible.
Here it says vla- :
But no vla in this help ?
You guys must have learned it somewhere, or there was a Lisp master near you, or you had good documentation.
I would like a help with examples for every command, I dont mind if some functions refer to the same example, but if you have a working example, you can test it and change a few things to check how its working.
The help doesn't list the individual properties or methods, since the approach in VLISP is more generic than that. It provides means to create objects (vlax-create-object ...), call methods (vlax-invoke-method ...) and (vla-Method ...), and work with properties (vla-get-property ...) (vla-get-PropertyName ...) on those objects. This applies not just to the AutoCAD ActiveX objects but pretty much *anything* e.g. I've used it for working with the MSXML DOM as well as the ProSteel/ProStructures object enabler. Different objects have different methods and properties.
In order to use this, you must have a basic understanding of object oriented programming (objects, methods, properties) as well as a familiarity with the object model of what you are working with. Once you know about the objects you are working with, you know what methods can be called as well as what properties can be get and/or set. For AutoCAD, thats covered in the ActiveX documentation.
I just click F1 to bring up the help interface. You can also type HELP in the command line to access it.
I am not sure about AutoCAD Electical. My one is vanilla AutoCAD.
If I understand it right there is no VLA help because there are to many objects ?
This part has a block selection and looks to all attributes, if there on or off and toggle's it.
(vlax-for OBJ (setq SEL (vla-get-activeselectionset (vla-get-activedocument (vlax-get-acad-object)) ) ;_ end of vla-get-ActiveSelectionSet ) ;_ end of setq (foreach ATT (append (vlax-invoke OBJ 'GETATTRIBUTES) (vlax-invoke OBJ 'GETCONSTANTATTRIBUTES) ) ;_ end of append (if (vl-position (strcase (vla-get-tagstring ATT)) TAG) (vla-put-invisible ATT (cond ((eq :vlax-true (vla-get-invisible ATT)) :vlax-false) (:vlax-true) ) ;_ end of cond ) ;_ end of vla-put-invisible ) ;_ end of if ) ;_ end of foreach ) ;_ end of vlax-for
So with the vlax-invoke it makes an vla object.
But why is the vlax called GETATTRIBUTES and the vla VLA-GET-TAGSTRING ?
And the vlax GETCONSTANTATTRIBUTES called VLA-GET-INVISIBLE ?
Are they linked ?
Do you makeup these vla names ?
It works but I dont understand why.
*sigh* No - they AREN'T just "made up". They refer to methods and properties of objects. Those objects, along with the methods and properties applicable to each, are documented in the AutoCAD ActiveX documentation. The (vla-CallMethod ...) (vla-get-PropertyName ...) are used to call the methods and get/set the properties of these objects, not just for AutoCAD but other objects as well (MSXML, Excel, etc.). Once you understand the objects, you can apply the VLISP functions to call the methods and manipulate the properties as needed, or as much as the interface will allow.
Its a functional level of understanding, rather than memorizing everything by rote. Like learning how to drive a vehicle, as opposed to memorizing the specific steps to driving a Yugo. If you do the former you apply the techniques to any vehicle; the latter, you have problems driving anything else.