Want to win a PS4? Go Premium and enter to win our High-Tech Treats giveaway. Enter to Win

x
?
Solved

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

Posted on 2011-02-24
5
Medium Priority
?
507 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 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

Free Tool: Subnet Calculator

The subnet calculator helps you design networks by taking an IP address and network mask and returning information such as network, broadcast address, and host range.

One of a set of tools we're offering as a way of saying thank you for being a part of the community.

Question has a verified solution.

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

Our company has proprietary drawing files that we do not give to our customers for final documentation. Our customers now require that we give them these drawings. They understand that they are proprietary and do not require them to be in AutoCAD bu…
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 video, Percona Solution Engineer Dimitri Vanoverbeke discusses why you want to use at least three nodes in a database cluster. To discuss how Percona Consulting can help with your design and architecture needs for your database and infras…
In this video, Percona Solution Engineer Rick Golba discuss how (and why) you implement high availability in a database environment. To discuss how Percona Consulting can help with your design and architecture needs for your database and infrastr…
Suggested Courses

609 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