Solved

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

Posted on 2011-02-24
5
492 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 500 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

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

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

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!…
In this article, we will see the basic design consideration while designing a Multi-tenant web application in a simple manner. Though, many frameworks are available in the market to develop a multi - tenant application, but do they provide data, cod…
You have products, that come in variants and want to set different prices for them? Watch this micro tutorial that describes how to configure prices for Magento super attributes. Assigning simple products to configurable: We assigned simple products…
This is a video describing the growing solar energy use in Utah. This is a topic that greatly interests me and so I decided to produce a video about it.

919 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

Need Help in Real-Time?

Connect with top rated Experts

13 Experts available now in Live!

Get 1:1 Help Now