@Ranjit_Singh wrote:
.... OR user manipulation was involved to mislead all the other community members.
It's hard to know how to respond to such a statement, except perhaps to suggest that any notion that I would participate here with any purpose to mislead anyone is easily enough refuted by directing you to:
Top Solution Authors / View All / All Time
[Let's see -- yes, I'm going to boast a little -- if you manage to rack up 10 more Accepted Solutions than I do every month on average (once in a while you do), you'll catch up to me in about 5 years.]
But I figured out what the difference is. You may choose to consider it "user manipulation," but I consider it "functional enhancement." I've had it in place long enough that it's just background for me by now, so it took me a while to realize. It's not the difference between (command) and (command-s), nor about whether there is an *error* handler defined, either inside or external to any command definition, but the key is the difference between
(command-s "offset")
and
(command-s "_.offset")
[or the equivalent (command-s "._offset") -- either order of underscore and period/decimal works, as it would also in English versions without the underscore character].
I have an enhanced definition of the OFFSET command, in a routine which Undefines the original first. The enhanced version allows changing the Offset distance without exiting the command, including changing between a numerical distance and the Through option. You can try it out -- it's available here. It's because of that Undefinition that I need the period/decimal prefix on the command name in order for the BUFFER command in this thread to work, and it does work when I add that. OFFSET is the only command I have "replaced" in such a way, so if this thread had involved any other command, there would have been no issue.
I notice that in your screencast examples in Post 21, you do include the ._ prefix on command names. If that had been included in Post 3, it would have worked for me all along, but it wasn't in the OP's original, and neither you nor I thought to add it in our suggested alterations.
When I first started getting into (defun)ing custom commands, I was using Architectural Desktop, which similarly Undefined the LAYER command and made its own specialized version. That meant that (command "layer") caused an unknown-command error, and anything I did involving LAYER in a (command) function had to be done with the period/decimal prefix. Since then, I've always included that, as well as the underscore because of the international reach of these Forums, in any kind of custom command definition.
Kent Cooper, AIA