(setq lstSyms (append lstSyms (list item))) LstSyms nil lstFuncs nil lstCmds nil lstVars nil) (defun c:LISPDumpFile ( / afList nSyms nFuncs nCmds nVars To do the comparison between the files, you can use a utility like WinDiff or UltraEdit or even MS Word. You can do a comparison AutoLISP definitions by exporting out what is currently defined, renamed the file created, load an AutoLISP file, and then before a second export. To determine the type of definition in the list returned by ATOMS-FAMILY, I used the TYPE function and to see if a definition is prefixed with "C:" to determine which functions at like a command at the Command prompt.Īfter the command is ran, the number of symbols, functions, global variables, and commands is output to the Command Line window, and a file named LspDumpFile.log is created under the root of the C drive. The command that is defined creates four lists, and then sorts each before exporting the definitions out. The following is some sample code that exports the symbols, functions, global variables, and commands that are defined via AutoLISP or exposted to AutoLISP from. If the check fails, you can then load the necessary file.Įntering (atoms-family 1 '("getpoint" "getpoints" "PI")) at the Command prompt returns a long list that might look like the following. This check can be helpful if your routines depend on the definition of a function from a previously loaded file. The list returned is useful, but can take a while to sort through as it is not in alphabetical order or an order that will make much sense.Īs mentioned previously, you can use the ATOMS-FAMILY function to test for the existence of a symbol, function, or variable by passing in a list of the items you want to see exist. ![]() "VLA-GET-SHOWPLOTSTYLES" "VLA-GET-NUMCELLSTYLES" "AI_RETURN" "C:SAVEALL") ("ACTOOLBARDOCKBOTTOM" "ACET-VAR-SETVAR" "ACVIEWPORT4" "AC3IN_1FT" "VLA-ADDBOX" Symbol_list - Optional List of symbols, variables, or functions to search for.Įntering (atoms-family 1) at the Command prompt returns a long list that might look like the following. ![]() Valid values are 0 for Symbols or 1 for Strings. This ability to check for the existence of previous definitions is helpful if you want to see which functions are exposed before loading an AutoLISP file.įormat - Determines how the values in the returned list are formated. You can also use the function to check to see if a specific symbol, global variable, and/or function is currently defined or set. The ATOMS-FAMILY (not the Adams Family) function returns a list of all the symbols, global variables, and functions currently defined for use by AutoLISP. AutoLISP is one of the oldest and easiest ways of extending AutoCAD, but did you ever wonder what functions are currently defined or which global variables are already set?
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |