+ Reply to Thread
Page 1 of 2 1 2 LastLast
Results 1 to 10 of 11
  1. #1
    Full Member
    Using
    AutoCAD 2012
    Join Date
    Sep 2011
    Location
    Sweden
    Posts
    40

    Default List all defined functions.

    Registered forum members do not see this ad.

    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!

  2. #2
    Super Moderator Tiger's Avatar
    Computer Details
    Tiger's Computer Details
    Operating System:
    Windows 7 Professional 64 bit
    Computer:
    HP EliteBook 8570w
    CPU:
    Intel Core i7-3720QM 2.60GHz
    RAM:
    16GB
    Graphics:
    NVIDIA Quadro K2000M
    Monitor:
    HP
    Discipline
    Civil
    Tiger's Discipline Details
    Occupation
    Education /support
    Discipline
    Civil
    Details
    Support/Education/Retail
    Using
    Civil 3D 2016
    Join Date
    Nov 2006
    Location
    Fjärdhundra, Sweden
    Posts
    5,148

    Default

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

  3. #3
    Forum Deity MSasu's Avatar
    Discipline
    Construction
    MSasu's Discipline Details
    Occupation
    engineer
    Discipline
    Construction
    Details
    AutoLISP programmer
    Using
    AutoCAD 2013
    Join Date
    Mar 2009
    Location
    Brasov, Romania
    Posts
    4,008

    Default

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

    Code:
    (atoms-family 1)
    Regards,
    Mircea

  4. #4
    Quantum Mechanic Lee Mac's Avatar
    Computer Details
    Lee Mac's Computer Details
    Operating System:
    Win 7 Pro / Win 10 Pro / Linux Mint
    Discipline
    Multi-disciplinary
    Lee Mac's Discipline Details
    Discipline
    Multi-disciplinary
    Details
    Custom Programming / Software Customisation
    Using
    AutoCAD 2018
    Join Date
    Aug 2008
    Location
    London, England
    Posts
    19,595

    Default

    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.
    Lee Mac ProgrammingTwitterExchange App StoreDropbox (500MB free)

    With Mathematics there is the possibility of perfect rigour, so why settle for less?

  5. #5
    Super Moderator SLW210's Avatar
    Computer Details
    SLW210's Computer Details
    Operating System:
    Windows 7 PRO 64-bit
    Computer:
    IBM Lenovo
    Motherboard:
    ACPI x64
    CPU:
    Pentium(R) i5 4570 @ 3.2GHz
    RAM:
    8 GB RAM
    Graphics:
    Nvidia Quadro 600 1GB
    Primary Storage:
    300 GB
    Secondary Storage:
    650GB
    Monitor:
    2x ThinkVision 24"
    Discipline
    Multi-disciplinary
    SLW210's Discipline Details
    Occupation
    Design Draftsman
    Discipline
    Multi-disciplinary
    Details
    Mostly do drafting related to manufacturing. From doing site layouts with proposed updates, additions and renovations to be budgeted and submitted for bid, to updating and changing existing drawings to reflect maintenance and repair/revision work done on site.
    Using
    AutoCAD 2018
    Join Date
    May 2007
    Location
    South Florida, USA
    Posts
    12,128

    Default

    Express tools has LSP.lsp.

    Michael Puckett (MP) used to frequent the Swamp, it may be posted over there.
    “A narrow mind and a fat head invariably come on the same person” Zig Zigler



  6. #6
    Senior Member GP_'s Avatar
    Using
    AutoCAD 2017
    Join Date
    Oct 2010
    Location
    Vercelli, Italy
    Posts
    308

    Default

    I found this download
    atoms15.VLX

    Nice

  7. #7
    Quantum Mechanic Lee Mac's Avatar
    Computer Details
    Lee Mac's Computer Details
    Operating System:
    Win 7 Pro / Win 10 Pro / Linux Mint
    Discipline
    Multi-disciplinary
    Lee Mac's Discipline Details
    Discipline
    Multi-disciplinary
    Details
    Custom Programming / Software Customisation
    Using
    AutoCAD 2018
    Join Date
    Aug 2008
    Location
    London, England
    Posts
    19,595

    Default

    Good stuff It is a great utility.
    Lee Mac ProgrammingTwitterExchange App StoreDropbox (500MB free)

    With Mathematics there is the possibility of perfect rigour, so why settle for less?

  8. #8
    Full Member
    Using
    AutoCAD 2012
    Join Date
    Sep 2011
    Location
    Sweden
    Posts
    40

    Default

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

  9. #9
    Forum Deity MSasu's Avatar
    Discipline
    Construction
    MSasu's Discipline Details
    Occupation
    engineer
    Discipline
    Construction
    Details
    AutoLISP programmer
    Using
    AutoCAD 2013
    Join Date
    Mar 2009
    Location
    Brasov, Romania
    Posts
    4,008

    Default

    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

  10. #10
    Forum Deity MSasu's Avatar
    Discipline
    Construction
    MSasu's Discipline Details
    Occupation
    engineer
    Discipline
    Construction
    Details
    AutoLISP programmer
    Using
    AutoCAD 2013
    Join Date
    Mar 2009
    Location
    Brasov, Romania
    Posts
    4,008

    Default

    Registered forum members do not see this ad.

    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

Similar Threads

  1. Difficulty calling user defined functions...
    By TheyCallMeJohn in forum AutoLISP, Visual LISP & DCL
    Replies: 3
    Last Post: 27th Dec 2010, 11:20 pm
  2. New Sketch Opens as Under Defined
    By Paul Miller in forum SolidWorks
    Replies: 8
    Last Post: 4th Jun 2010, 07:19 pm
  3. "User defined attribute list" won't save settings
    By M_Simons in forum Electrical
    Replies: 2
    Last Post: 17th Aug 2009, 04:15 pm
  4. deleting defined selections
    By tumble2bounce in forum AutoCAD Beginners' Area
    Replies: 5
    Last Post: 27th Jan 2006, 03:49 pm

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts