Lisp insert commands not working
I use a series of commands that insert objects such as scales into dwg.
Please see the associated list menu commands
^C^C^C^PINSERT;H:/BCADD/LIBSYM/GEN/GEN2-63.DWG;\;;;
This would drop the object at the current pointer location for a single click to place, no other prompts. Please, let me know what I need to do to make this function.
Thanks in advance
Comments
-
Hello Braan,
This is NOT Lisp!!!!! What you are trying to use is just a macro.
Nevertheless, the solution is:
^C^C^C^P_.-INSERT;H:/BCADD/LIBSYM/GEN/GEN2-63.DWG;\;;;
Regards, Stephan
0 -
Stephan,
Thank you for clearing up that it is not lisp, as I am clearly not a programmer. Thank you for the fix
I tried the modification you offered. and the prompt tells me...
Unable to recognize command "H:/BCADD/LIBSYM/GEN/GEN2-62.DWG". Please try again.
And opens the insert dialog box. I did confirm that the path is correct and the file is there.
I would apprecaiate any additonal help you could provide.
Braan
0 -
Braan, the path part might be correct although finding files that way is often hard to get right.
But ^P (ctrl-P) issues the Print command and I wonder why there is a "_" after it and what looks like a stop.
"Unable to recognize command..." means the command "insert" has not worked and the script moved onto the next part.
0 -
FYI:
^P: Suppress echoes from macros (doesn't work on BC)
_: Translate the command (required if you use a different language version)
.: Use the original version of the command if the command has been redefinedStephan's macro works fine for me. Try copy-pasting his code.
0 -
When I paste "^C^C^C^P_.-INSERT" to the command line it returns "Unable to recognize command ""^C^C^C^P_.-INSERT". Please try again."
0 -
...however, there are differences in the way command line macros and macro ines in say a .mnu file are deciphered.
For that reason I try to avoid expressions which do not work in all instances.
The Script Recorder is a guide to what will work - record it and open the script file to see what's inside - if there are gaps where you expect to see something else you might expect trouble.
I believe the same applies to Acad.
0 -
Hi John, Hi Braan,
"For that reason I try to avoid expressions which do not work in all instances."
I am not sure why, but ok, then like that:
_.-INSERT;H:/BCADD/LIBSYM/GEN/GEN2-63.DWG \
There is 1 space after the path and there are 3 spaces at the end but you cannot see it. That's why I like the semi-colon better.
Other than that, expressions like ^C^C and the like don't work when you directly write it to the command line by hand. I guess, that is what you, Braan, must have done. They only work from inside a macro.
0 -
And also: Hi Roy!
Thanks for the support.
0 -
"For that reason I try to avoid expressions which do not work in all instances." is for just such a situation as this, where pasting to the command line might trip up for more than one reason.
Just wait til your brain is full and starting to leak - I had forgotten ^C does not work on the command line and never knew about ^P and _..
I expressed it badly, when trialling a macro I leave out code such as ^C, \H etc until I know the basic code works. Then I add those characters to the script file or menu line. The same has to be done with macros created by the script recorder.
0 -
Thank you for all the responses and examples.
I was able to get the following line to perfrom like a champ!!!!
^C^C^C^_.-INSERT;H:/BCADD/LIBSYM/GEN/GEN2-62.DWG;\;;;
I hope others can benefit from it.
0