Jump to content

List all defined functions.


ripuz

Recommended Posts

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!

Link to comment
Share on other sites

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

Link to comment
Share on other sites

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

Link to comment
Share on other sites

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.

Link to comment
Share on other sites

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

Link to comment
Share on other sites

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

Link to comment
Share on other sites

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

Link to comment
Share on other sites

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!

Link to comment
Share on other sites

  • 8 years later...

This thread perplexes me. I discovered atoms-family a month ago and realized names and symbols I long thought hidden were actually exposed. So I learned about separate namespace vlx, which I thought would hide them again. They're still exposed, but I guess that's OK. The separate namespace vlx seems to prevent my fear of someone redefining my security routine so it always returns 'true'. I have some of my stuff locked to within my office. 

However, the separate namespace VLX presented me with a new problem in my security routine that slowed down execution because of the frequency a file was being checked. (Long story.) So I wrote something new in C# and compiled it into a DLL. For some reason, I thought DLL's could be included as a resource file and embedded inside a VLX. But now that I'm all done going down this path, I don't think I can do that at all.

So here I sit today. Without testing it, I think I can import my new DLL using vl-arx-import or perhaps lv-doc-import. But I feel like I'm right back where I was a month ago. Someone could replace my DLL with their own so it always gives a good response.

Did I loop back around to the start? Or is there a way of including/importing my DLL into the VLX with assurance it's mine?

Link to comment
Share on other sites

I have no idea how this works but something like this reads the code in the dll Aecx.dll

 

(setq schedApp (vla-getInterfaceObject (vlax-get-acad-object)  "AecX.AecScheduleApplication8.2")) ; change x.x.
(setq propSets (vlax-invoke-method schedApp 'PropertySets vlaObj)

 

Link to comment
Share on other sites

I wonder if there's a way to validate my signature, and retrieve my company name in the process, from my signed digital signature of the DLL? I looked into some powershell scripts and couldn't make it work. I'm going to do more research and experiments in that direction. First, I'll see what happens when the signature becomes invalid.

Link to comment
Share on other sites

Get-AuthenticodeSignature -FilePath <file path and name>

I can run this through the powershell and get my code signing certificate number and status as "Valid". But I can't figure out how to run that through AutoLISP. And then obviously would need to store those results so I can test them both to make sure it checks out. The whole point of code signing is to check for modifications and source, I would think this would be easier. I need it to be inside LISP so it resides inside my separate namespace vlx.

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