Solved

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

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

How your wiki can always stay up-to-date

Quip doubles as a “living” wiki and a project management tool that evolves with your organization. As you finish projects in Quip, the work remains, easily accessible to all team members, new and old.
- Increase transparency
- Onboard new hires faster
- Access from mobile/offline

Join & Write a Comment

Suggested Solutions

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…
The following article will describe how to add/edit a dimension style through AutoCAD VBA. AutoCAD VBA has its quirks and when it comes to dimensions and controlling how they look through VBA.  This is where AutoCAD can be vividly confusing. The…
In this seventh video of the Xpdf series, we discuss and demonstrate the PDFfonts utility, which lists all the fonts used in a PDF file. It does this via a command line interface, making it suitable for use in programs, scripts, batch files — any pl…
This demo shows you how to set up the containerized NetScaler CPX with NetScaler Management and Analytics System in a non-routable Mesos/Marathon environment for use with Micro-Services applications.

757 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

20 Experts available now in Live!

Get 1:1 Help Now