?
Solved

What controls the ability to run a LISP routine from the command line?

Posted on 2011-02-24
5
Medium Priority
?
511 Views
Last Modified: 2012-06-21
I have a custom CUI from which I am able to run a LISP routine; however, when I attempt to run the same routine from command line I get 'unknown command.' Is there file I'm not aware of in which routines called from the command line are defined?
0
Comment
Question by:tsynnott
  • 3
  • 2
5 Comments
 
LVL 12

Expert Comment

by:silverkorn
ID: 34971409
to load and unload LISPs you can use the command APPLOAD
In this window you can see a listing of applications (LISPs) that are currently loaded and also a history of previously used applications. You can also add or remove applications that you wish to load with AutoCAD's startup, see image for more detail

 APPLOAD
To run your custom LISP, make sure it is listed in the 'Startup Suite'. This will ensure that your LISP will always load with AutoCAD
0
 

Author Comment

by:tsynnott
ID: 34980203
RELIMIT command as defined in partial CUIsilverkorn - sorry, I was NOT clear enough.
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".
0
 
LVL 12

Expert Comment

by:silverkorn
ID: 34980342
You are getting this error because you are creating a Menu Item and not necessarily a command line shortcut. The field "Command Name" is for "Displays the name of the Macro"

the easiest and quickest solution to your problem is to edit your LISP function to accept the command RELIMIT instead of RLIMIT

to do that open the LISP file in notepad and change the line that should look like:
(defun c:rlimit (     TO:
(defun c:relimit (

then you need to change your macro command to:
^C^C(if (= relimit nil) (load "DLCRLMIT")) (relimit)
0
 
LVL 12

Accepted Solution

by:
silverkorn earned 2000 total points
ID: 34980436
0
 

Author Comment

by:tsynnott
ID: 34983041
I found a .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 AutoCAD 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. Thanks for working with me on this.
0

Featured Post

New feature and membership benefit!

New feature! Upgrade and increase expert visibility of your issues with Priority Questions.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Following a number of instances of re-installing Solidworks I thought that it may be a  good idea to detail the procedure that I follow each time to ensure a good stable install. Backup: Backup your system.  It goes without saying that this i…
If, like me, you find yourself repeatedly and tediously joining many segments (lines, arcs) in other people's drawings back into polylines that can be used more effectively in Computer Aided Machining and Laser Cutting, then this article is for you!…
When cloud platforms entered the scene, users and companies jumped on board to take advantage of the many benefits, like the ability to work and connect with company information from various locations. What many didn't foresee was the increased risk…
As many of you are aware about Scanpst.exe utility which is owned by Microsoft itself to repair inaccessible or damaged PST files, but the question is do you really think Scanpst.exe is capable to repair all sorts of PST related corruption issues?
Suggested Courses

840 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question