Ahankhah Posted August 22, 2010 Posted August 22, 2010 Does any one know where I can find some help for a huge number of visual lisp fuctions not in visual lisp help? Some of them are as follow: vla-Activate, vla-Add, vla-Add3DFace, vla-Add3DMesh, vla-Add3DPoly, vla-AddArc, vla-AddAttribute, vla-AddBox, vla-AddCircle, vla-AddCone Mehrdad Ahankhah www.irancad.com Quote
Lee Mac Posted August 22, 2010 Posted August 22, 2010 The help on these functions is written for VBA but it is easy to make the connection to VL - highlight them in the VLIDE and click on the beige button with the question mark (?). Quote
Tharwat Posted August 22, 2010 Posted August 22, 2010 Hello. Does the connection between VBA with VL in a Lisp routine would look like an entmake structure ? I hope that I could see an example joining them in one. Best regards, Quote
Lee Mac Posted August 22, 2010 Posted August 22, 2010 The function arguments, their type and order are all the same. Quote
Ahankhah Posted August 23, 2010 Author Posted August 23, 2010 The help on these functions is written for VBA but it is easy to make the connection to VL - highlight them in the VLIDE and click on the beige button with the question mark (?). Thank you Lee Mac, I downloaded VBA from this address: http://usa.autodesk.com/adsk/servlet/item?siteID=123112&id=12715668&linkID=9240618 then unpacked and installed it, but still unable to get help about above functions. Even there is no inormation about the terms like "activate", "add", etc. Mehrdad Ahankhah www.irancad.com Quote
Lee Mac Posted August 23, 2010 Posted August 23, 2010 You don't need the VBA module to get the help for those functions - they are in the VLIDE help files, just follow the last part of my earlier post. Quote
BlackBox Posted August 23, 2010 Posted August 23, 2010 Lee answered your question (twice). Maybe this thumbnail will help? Quote
Tharwat Posted August 23, 2010 Posted August 23, 2010 RenderMan, Have you ever used VBA in your VL routines ? If YES, Would you please show me an example ? Many Thanks, Quote
BlackBox Posted August 23, 2010 Posted August 23, 2010 RenderMan, Have you ever used VBA in your VL routines ? If YES, Would you please show me an example ? Many Thanks, The short answer is YES. Both VBA and Visual LISP use the ActiveX COM API. Source: http://forums.augi.com/showthread.php?t=111828 Here's a short example, give it a try: (defun c:TEST (/ ss) (vl-load-com) (cond (*activeDoc*) ((setq *activeDoc* (vla-get-activedocument (vlax-get-acad-object))))) (vla-startundomark *activeDoc*) (if (setq ss (ssget "_x")) (progn (vlax-for x (setq ss (vla-get-activeselectionset *activeDoc*)) (vla-delete x)) (vla-delete ss) (vla-put-attachmentpoint (vla-addmtext (vla-get-modelspace *activeDoc*) (vlax-3d-point '(0 0 0)) 0 "{\\C230;O'Doyle [url="file://\\L\\C2;Rules\\l\\C230"]\\L\\C2;Rules\\l\\C230[/url];!}") acattachmentpointmiddlecenter) (vla-zoomextents (vlax-get-acad-object)))) (vla-endundomark *activeDoc*) (princ)) ;_end defun There are two ways (that I know of) to view the ActiveX COM API documentation within AutoCAD: Within the VLIDE, use the Apropos button to search for VL commands (i.e., the "ActiveX and VBA Reference") (My personal preference) Or, within the VBAIDE, Hit the F2 key, or using the Menu bar go to (View >> Object Browser) They both provide for the same content, just in slightly different formats, so use whichever makes more sense to you. One who is more proficient in AutoLISP may find the VLIDE documentation more easily understood. Hope this helps! Quote
BlackBox Posted August 23, 2010 Posted August 23, 2010 Tharwat, I posted a response a while ago, but it is awaiting moderator approvel 'cause I'm *new* [here at CADTutor]. Quote
Ahankhah Posted August 24, 2010 Author Posted August 24, 2010 Lee answered your question (twice). Maybe this thumbnail will help? But my problem is accessing the help (offline or online). When I am offline, the first page of acad 2011 help is opened (i.e. landing.html") and if I am online, I see this page: http://docs.autodesk.com/errors/404.htm showing that the help for that function is not found. What is wrong with my autocad:(? Mehrdad Ahankhah www.irancad.com Quote
Lee Mac Posted August 24, 2010 Posted August 24, 2010 Ah - I know what you mean, in ACAD 2011 they stupidly changed the help file from chm to html, and I don't think you can get the help on VLA-* functions anymore by default. There is a .chm help file for 2011 on the Autodesk site somewhere though. Quote
Tharwat Posted August 30, 2010 Posted August 30, 2010 Tharwat, I posted a response a while ago, but it is awaiting moderator approvel 'cause I'm *new* [here at CADTutor]. I have just received an Email indicating about your code post . What a example !!! That example will kick out all elements and lay down on a throne alone with a string "O'Doyle Rules!". :lol: It was good that I tried it in a new drawing . Thanks you RenderMan. Tharwat Quote
Lee Mac Posted August 30, 2010 Posted August 30, 2010 The short answer is YES. Here's a short example, give it a try: There are two ways (that I know of) to view the ActiveX COM API documentation within AutoCAD: Within the VLIDE, use the Apropos button to search for VL commands (i.e., the "ActiveX and VBA Reference") (My personal preference) Or, within the VBAIDE, Hit the F2 key, or using the Menu bar go to (View >> Object Browser) They both provide for the same content, just in slightly different formats, so use whichever makes more sense to you. One who is more proficient in AutoLISP may find the VLIDE documentation more easily understood. Renderman, is what is the example trying to demonstrate? Quote
BlackBox Posted August 30, 2010 Posted August 30, 2010 Renderman, is what is the example trying to demonstrate? I've run into Tharwat on several occasions in the past, and he has made it clear to me that, while adept at using Auto LISP, he is unfamiliar with using Visual LISP. His question was "have I used VBA in my VL routines," and while I've obviously not used VBA syntax (it's Visual LISP!), they do share the same API. That said, this was a simple (and I hope, fun?) example, demonstrating the ActiveX COM API (via Visual LISP), with some levity interjected for effect... ensuring no permanent data loss as a result of said levity. Admittedly, this could have been done offline. None the less... here we are. Quote
BlackBox Posted August 30, 2010 Posted August 30, 2010 I have just received an Email indicating about your code post . What a example !!! That example will kick out all elements and lay down on a throne alone with a string "O'Doyle Rules!". :lol: It was good that I tried it in a new drawing . Thanks you RenderMan. Tharwat Glad you liked it, Tharwat. I've used it in the past as a humorous way of dealing with unauthorized folks trying to use my team's development tools. I put in a validation function that loads at the end of my .FAS file which tests for authorized user names (getvar 'loginname), and if not authorized, redefined all of the defun's with this function, along with some extra "goodies." Think: "Ah ah ah! You didn't say the magic password!" - Jurassic Park style. :wink: Quote
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.