PDA

View Full Version : New menu load



rbhazie
2014-12-19, 06:00 PM
I have created a new Menu and I have loaded the new menu and it come in fine. However when I try and run a command off the new menu I get "UnKnown command"
I added the the path to my profile, but the .lsp files do not seem to load when I call up a drawing? What am I missing?

Tom Beauford
2014-12-22, 11:48 AM
For lisp commands I usually use a macro that tests to see if the command is defined and load the lisp if it is not. Then call the lisp command as in the example below.
^C^C^P(or C:AcresField (load "AcresField.lsp"));AcresField
You could also preload your lisp or use an autoloader, but your lisp must be loaded for each opened drawing.

rbhazie
2014-12-22, 08:02 PM
Thanks Tom, Can I ask what is the ^P used for? Also I have my lisp files on our network drive. So my path would be T:ACAD\ACAD2012 how will that look in macro form? I can not get mine to run correctly. Thanks

Tom Beauford
2014-12-22, 09:11 PM
Thanks Tom, Can I ask what is the ^P used for? Also I have my lisp files on our network drive. So my path would be T:ACAD\ACAD2012 how will that look in macro form? I can not get mine to run correctly. Thanks

^P Toggles the display of the menu macro on the command line; makes the macro look neater when you use it.
\ Pauses for user input, such as picking a point or entering a value. That's why your macro pauses every time it tries to read your path. You could substitute / for each \ I put my lisp in a folder added to the support path so no paths are needed in my macros.