PDA

View Full Version : toolbar button for dimension



jakob_k
2009-08-10, 09:42 PM
hi,
i know a toolpalette button will create a dimension and then return to the original working layer. i'm trying to create a toolbar button (not palette) to do the same. i can perform stuff before the dimension command, but i'm not able to add anything after the dimension(dimaligned) is envoked.

example:

^C^C(load "C:/LISP/Check-Layer.lsp")(Check-Layer "DIM");-dimstyle;restore;dim_oblique;_dimaligned;


any ideas?
karl

RobertB
2009-08-10, 10:55 PM
You have to wrap the whole thing in Visual LISP code so that you can handle an unknown number of user actions before restoring the original layer.

Or you need to create an event handler/reactor to modify the layer of dimension objects after they have been added.

jakob_k
2009-08-12, 07:41 PM
oh crumbs...

thank you though. i was suspecting this.
karl

irneb
2009-08-14, 01:46 PM
Or just add the following:
^C^C(load "C:/LISP/Check-Layer.lsp")(Check-Layer "DIM");-dimstyle;restore;dim_oblique;_dimaligned;
(while (= (logand (getvar "CMDACTIVE") 1) 1) (command pause));
The stuff you want to do after the user completes here

RobertB
2009-08-14, 08:17 PM
Good point. Why didn't I think of that?!