My problem is with calling a custom command from the command line. The command is successfully called from a menu item contained in a partial CUI. The command, as shown in the attachment, is RELIMIT. Since the command is defined as RELIMIT in the Comand Name field I expected this would be the value submitted from the command line. Again, the operation works when selected from the menu in the partial CUI, but when entered from the command line I get the following message: Unknown command "RELIMIT". Is there somewhere else I need to define this command (acad2009.lsp, perhaps)?More precisely, the problem is with calling a custom command from a menu item contained in a partial CUI. The command, as shown, is RELIMIT. Since the command is defined as RELIMIT on the Comand Name line I expected that this would be the value submitted from the command line. The operation works when selected from the menu in the partial CUI, but when entered from the command line I get the following message: Unknown command "RELIMIT".
Solved! Go to Solution.
RELIMIT is the menu item name and has nothing to do with your loaded routine: your routine is calling and loading a file called DLCRLMIT. Maybe that is what you type instead, or RLIMIT.
Otherwise you need to find and open that DLCRLMIT lisp (or user help file that may have come with it) and find out what command you do need to type. The Author of that routine can help.
Thanks for the quick response.
First, the person who wrote the command (and designed the menuing system I have just moved from 2002 to 2009) is long gone. Which leads me to note -- in 2002 typing RELIMIIT in the command line does run the macro defined in the MNS file. The following line is taken directly from the 2002 MNS: [RELIMIT - Redefine Drawing Limits/Plot Scales:]^C^C(if (= rlimit nil) (load "DLCRLMIT")) (rlimit).
Second, in 2002 entering 'DLCRLMIT' or 'rlimit' in the command line produces the "Unknown command..." message.
Finally, the way the CUI form is designed, it seems to me the 'Command Name' is meant to map to the Maco value. I can't imagine another reason for a 'Command Name' value since the Display Name value defines what appears on the menu (which works). Can you think of any other file in which RELIMIT gets mapped to its Macro?
Let's clarify to make sure we understand each other: nothing, NOTHING, tagged or named or renamed in the CUI or R2002's MNU/MNS files back in the day will make any command suddenly available at the command line to be typed.
Your external routine must load in AutoCAD and then you can type whatever that routine's creator made available to you to type. Perhaps your R2002 seat had a PGP file edit that redirected the word RELIMIT to whatever this routine calls to launch.
Is this routine a open LISP? If yes, post it let someone here look at it more closely and see what the real issue is with it or the CUI.
What is RLIMIT variable (it must be nil to run the customization) that your routine is calling?
Thanks, this is valuable information (e.g. nothing tagged... etc.) I'm a complete neophyte regarding AutoCAD so I'm unfamiliar with such aspects as PGP files - I'll check a 2002 seat for possible clues.
To your question re path: yes, but should I assume that since the menu version of RELIMIT is running properly that the path in options is set correctly?
You will not find it in 2002 PGP file.
It could be in ACAD.LSP (back then ) a string to load this lisp.
Copy everything related to this customization to 2009 Support Folder. Make ACADDOC.LSP and put the load line of 2002 to it. Reboot.
Based on the OP posts... The fact that the routine runs as a picked menu item but not at the command line is an indication doing all this would not result in a fix: the command is being loaded with the menu item, the problem is no one knows what command it is actually calling, so loading it in ACADDOC.LSP will not be a cure.
I suspect it is calling RLIMIT, not E, since the CUI code looks for it before loading and calling it.
I followed patchy's advice and scoured the 2002 delivery for acaddoc.lsp. No luck. However, I did find a another .lsp file with what appeared to be load strings for a variety of menu commands that I am able to run from the command line in 2002. I copied the file to the Support folder on the 2009 machine, renamed it to ACADDOC.LSP, launched AutoCAD, loaded a file, entered RELIMIT in the command line and watched as the routine ran. Thank you all, and in particular, Patchy.