How can I find out what commands are offered by an ARX file?

How can I find out what commands are offered by an ARX file?

michellem
Advocate Advocate
428 Views
2 Replies
Message 1 of 3

How can I find out what commands are offered by an ARX file?

michellem
Advocate
Advocate

Hello;

 

I am trying to create a Lisp program that will be run in the accoreconsole program. So I first get the program to run successfully in regular Autocad because I can use the VLIDE to debugging tools. However, when I try to run the program in accoreconsole, it fails because accoreconsole does not recognize the documented GetPropertyValue function.

 

After doing some research and coming across the post "Equivalent to getpropertyvalue in accoreconsole" post in the AutoLisp forum, it turns out that the function is part of the acapp.arx / acapp.crx file. Load that file in accoreconsole and the program runs.

 

So my question is this: Given the name of an AutoLisp function, how can tell I if it comes from a ARX/CRX file? And more importantly, which ARX/CRX file?

 

Hopefully, there is some other method than trial and error.

 

Sincerely;

Michelle

 

PS: I think the answer to the first part of the question is simple:
Feeding this to the command prompt: !getpropertyvalue

yields #<SUBR @00000172aae48908 <EXRXSUBR>>

An internal lisp function like SSLENGTH will not have the <EXRXSUBR>

0 Likes
429 Views
2 Replies
Replies (2)
Message 2 of 3

daniel_cadext
Advisor
Advisor

I don’t think you can, however you can use AcEdCommandIterator and filter by command group. Usually the group can give a hint where the command comes from or if it exists

 

 static void AcRxPyApp_idoit(void)
 {
     std::unique_ptr<AcEdCommandIterator>iter(acedRegCmds->iterator());
     for (; !iter->done(); iter->next())
     {
         auto cmd = iter->command();
         acutPrintf(L"(%ls, %ls)", iter->commandGroup(), cmd->globalName());
     }
 }

 

(AcRxPyApp, IDOIT)(AcRxPyApp, PYCMDPROMPT)(AcRxPyApp, PYLOAD)(AcRxPyApp, PYRELOAD)(AcRxPyApp, PYRXVER)(AcLayerCommands, +LAYER)(AcLayerCommands, CLASSICLAYER)(AcLayerCommands, LAYER)(AcLayerCommands, LAYERCLOSE)(AcLayerCommands, LAYERPALETTE)(*DOC(0x000002b16c176770), ACAD-POP-DBMOD)(*DOC(0x000002b16c176770), ACAD-PUSH-DBMOD)(*DOC(0x000002b16c176770), ACAD_COLORDLG)(*DOC(0x000002b16c176770), ACAD_STRLSORT)(*DOC(0x000002b16c176770), ACAD_TRUECOLORCLI)(*DOC(0x000002b16c176770), ACAD_TRUECOLORDLG)(*DOC(0x000002b16c176770), ACDIMENABLEUPDATE)(*DOC(0x000002b16c176770), ACET-LAYERP-MARK)(*DOC(0x000002b16c176770), ACET-LAYERP-MODE)(*DOC(0x000002b16c176770), ACMR-ADD-CMD)(*DOC(0x000002b16c176770), ACMR-REMOVE-CMD)(*DOC(0x000002b16c176770), ADSPYLOAD)(*DOC(0x000002b16c176770), ADSPYLOADED)(*DOC(0x000002b16c176770), ADSPYRELOAD)(*DOC(0x000002b16c176770), BHATCH)(*DOC(0x000002b16c176770), BHERRS)(*DOC(0x000002b16c176770), BPOLY)(*DOC(0x000002b16c176770), C:-BLOCKREPLACE)(*DOC(0x000002b16c176770), C:-BLOCKTOXREF)(*DOC(0x000002b16c176770), C:-CDORDER)(*DOC(0x000002b16c176770), C:-LAYOUTMERGE)(*DOC(0x000002b16c176770), C:-REDIRMODE)(*DOC(0x000002b16c176770), C:-TCASE)(*DOC(0x000002b16c176770), C:-XLIST)(*DOC(0x000002b16c176770), C:3DARRAY)(*DOC(0x000002b16c176770), C:ACADINFO)(*DOC(0x000002b16c176770), C:ACETUCS-BACK)(*DOC(0x000002b16c176770), C:ACETUCS-BOTTOM)(*DOC(0x000002b16c176770), C:ACETUCS-FRONT)(*DOC(0x000002b16c176770), C:ACETUCS-LEFT)(*DOC(0x000002b16c176770), C:ACETUCS-RIGHT)(*DOC(0x000002b16c176770), C:ACETUCS-TOP)(*DOC(0x000002b16c176770), C:ADDVARS2SCR)(*DOC(0x000002b16c176770), C:AI_CIRCTAN)(*DOC(0x000002b16c176770), C:AI_CUSTOM_SAFE)(*DOC(0x000002b16c176770), C:AI_DESELECT)(*DOC(0x000002b16c176770), C:AI_DIM_TEXTABOVE)(*DOC(0x000002b16c176770), C:AI_DIM_TEXTCENTER)

 

Python for AutoCAD, Python wrappers for ARX https://github.com/CEXT-Dan/PyRx
0 Likes
Message 3 of 3

autoid374ceb4990
Collaborator
Collaborator

I don't know if this will help you, but for my old R14 ARX files you can open the ARX file with Wordpad and search for "C:".  Continue the search and you will come to a section in the ARX file that has a lot of "C:xxxx" data listed something like this:

C:SYM_LINE C:ROT_RESET C:MOVE_RESET C:ED_POINT

The text listed after C: will be the names of the ARX commands in that particular ARX file.

For LSP text files use the DOS command FINDSTR to list all occurrences of "C:" in a group of  LSP files.

0 Likes