@kina_86 wrote:
I would like to be without a lisp, but is ok... Now i set my botton to automatically load this lisp.
With a pure non-AutoLisp macro, you described the problem from the start -- defining the side to Offset to in a way that's guaranteed to get you the desired sides in all conditions.
If the idea is that you want to be able to use a Tool Palette button but not have to load an external file to define a command, and not that you have any objection to AutoLisp code being used in the button macro, you can do this:
*^C^C(setq ent (car (entsel "Pick: "))) \(foreach d '(10 20 -10 -20) (vla-offset (vlax-ename->vla-object ent) d))
or
(while (setq ent (car (entsel "Pick: "))) (foreach d '(10 20 -10 -20) (vla-offset (vlax-ename->vla-object ent) d)))
Not all AutoLisp functions can be used in command macros, but enough of them work to do that. You can expand on the prompt part if you like.
Both worked for me in limited testing -- they just have different ways of repeating automatically. It doesn't seem possible to suppress the (setq) function at the command line [yes, I tried the ^P thing], which is a visual disadvantage over the command-definition approach. [I prefer the first one, which ends more cleanly with Escape.]
Kent Cooper, AIA