Jump to content

Who moved my help file?


Ahankhah

Recommended Posts

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

Link to comment
Share on other sites

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 (?).

Link to comment
Share on other sites

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,

Link to comment
Share on other sites

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

Link to comment
Share on other sites

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! o:)

Link to comment
Share on other sites

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 :shock: showing that the help for that function is not found.

 

What is wrong with my autocad:(?

 

Mehrdad Ahankhah

www.irancad.com

Link to comment
Share on other sites

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.

Link to comment
Share on other sites

Tharwat, I posted a response a while ago, but it is awaiting moderator approvel 'cause I'm *new* [here at CADTutor]. :roll:

 

I have just received an Email indicating about your code post .

 

What a example !!! :shock:

 

That example will kick out all elements and lay down on a throne alone with a string "O'Doyle Rules!". :lol: :lol:

 

It was good that I tried it in a new drawing . :)

 

Thanks you RenderMan.

 

Tharwat

Link to comment
Share on other sites

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?

Link to comment
Share on other sites

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. :geek:

 

Admittedly, this could have been done offline. o:) None the less... here we are.

Link to comment
Share on other sites

I have just received an Email indicating about your code post .

 

What a example !!! :shock:

 

That example will kick out all elements and lay down on a throne alone with a string "O'Doyle Rules!". :lol: :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:

Link to comment
Share on other sites

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.

Guest
Unfortunately, your content contains terms that we do not allow. Please edit your content to remove the highlighted words below.
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...