Jump to content
ripuz

List all defined functions.

Recommended Posts

ripuz

Hello!

 

Is it possible to find out the names of all defined functions in a drawing?

The best would be if it was possible to see the entire definition, but I guess that´s just a dream...? :)

 

Thanks in advance!

Share this post


Link to post
Share on other sites
Tiger

What do you mean by 'defined functions'? The commands that are defined in the drawing? That you can find in the ACAD.PGP

Share this post


Link to post
Share on other sites
MSasu

Since you posted this in AutoLISP section, I presume that you are looking for AutoLISP functions loaded. For this you can use the ATOMS-FAMILY function that will list all existing symbols and parse the list to check for their type (should be "SUBR" or "USUBR").

 

(atoms-family 1)

Regards,

Mircea

Share this post


Link to post
Share on other sites
Lee Mac

The atoms-family function will return a list of all defined symbols in the current document namespace, this will include protected functions / constants and user defined functions and variables.

 

IIRC, Michael Puckett (MP) also created an 'atoms-family browser' program called "atoms.vlx" I can't remember where its posted though.

Share this post


Link to post
Share on other sites
SLW210

Express tools has LSP.lsp.

 

Michael Puckett (MP) used to frequent the Swamp, it may be posted over there.

Share this post


Link to post
Share on other sites
Lee Mac

Good stuff :thumbsup: It is a great utility.

Share this post


Link to post
Share on other sites
ripuz

Thank you all for the information about the atoms-family!

I found atoms16.vlx and it worked fine!

 

One question remains... is it possible to see the code of a function?

AutoCAD knows the definition of a function and therefor it should be possible to get the code for that function?

But I guess it´s not that simple...? :)

Share this post


Link to post
Share on other sites
MSasu

To get the code from what reside in memory I will say that is not possible. But I can be wrong.

 

But the AutoLISP functions should be loaded from somewhere; so locate the loading solution (acad.lsp, acaddoc.lsp, *.mnl or start-up list) and from there browse to the file. If those are in LSP format, then is easy to see the code (for FAS and VLX, Google will be your friend...).

 

Regards,

Mircea

Share this post


Link to post
Share on other sites
MSasu

Thinking twice on this, I have to ask what are you intending to do? If is about the functions that load on your oun workstation, then you should know what is in use (at least what is loaded and from where). Can you give more details on this? Thank you!

 

 

Regards,

Mircea

Share this post


Link to post
Share on other sites
Lt Dan's legs

NOTE

this will not work if you are trying to read vlx files!

 

 

 

if you know the name of the program see symbol service

 

APROPOS WINDOW

found in the view toolbar within the vlide window

 

. Type in the name and click ok. example c:copy

 

apropos results window will appear.

 

If you typed in the example (c:copy) a single result should return*

C:COPYM

 

double click on the highlighted result

 

This will popup another window called Symbole Service.

 

SYMBOL SERVICE

input the name of the program needed and click ok.

 

Look at the third button on the top (looks like a book) allow your mouse to hover over this button

and it should say "Show Definition".*

 

Click it and you will have what you are looking for.

 

*I have only tested this in autocad 2007

 

NOTE

this will not work if you are trying to read vlx files!

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

×