I would like to create a custom command to run offset and then specify a distance. I can create a custom tool, which works fine. But now, I would like to assign a key to that command. I added the key with the command to the pgp file, but no luck. Is there anyway to do this?
Solved! Go to Solution.
Do you want a key or two to start Offset and then you would type in the distance? Or do you want a key to start Offset and already have a set distance input for you as part of the command?
If the first one, the O, enter, should be set in the acad.pgp already.
If the other then you will need to add a simple line of code into your acaddoc.lsp file.
(DEFUN C4 () (SETVAR "CMDECHO" 0)(COMMAND ".OFFSET" "4")(PRIN1))
Set the O4 to what ever keys you want, set the "4" value to the distance you would want encoded.
You have to tell me exactly what you added and where as it is unclear from your post.
The code I posted substituted in a smiley face, the code should be.
(DEFUN C:O4 () (SETVAR "CMDECHO" 0)(COMMAND ".OFFSET" "4")(PRIN1))
Just in case, after typing 4 you have to hit enter.
The emoticon got me again, is there a way to force those to not show? I thought using the code wrap would do it, but no.
Access a broad range of knowledge to help get the most out of your products and services.