Benjo Posted February 4, 2011 Share Posted February 4, 2011 Hi y'all, I would like to modify or replace all the original command like Text, MText, Hatch, all Dimension, Leaders, etc... is it possible to modify them so that when i type, for exemple "MT" on the command prompt, its automaticaly go on the good layers? Thanks! Quote Link to comment Share on other sites More sharing options...
SOliver Posted February 4, 2011 Share Posted February 4, 2011 Hi Benjo, By good layers do you mean that once you create an entity it is placed on a specific layer regardless of the layer you are current on? for example current layer "test", run text command, text entity appears on "text layer" If this is the case a reactor would be a nifty approach. SOliver Quote Link to comment Share on other sites More sharing options...
Benjo Posted February 4, 2011 Author Share Posted February 4, 2011 Hi SOliver Exemple: You have 2 layer on a draw, 0 and A-ANNO-TEXT. Your current layer is 0. What i would like to find is how to make Mtext automaticaly on A-ANNO-TEXT when i type the Mtext command on command prompt. I have made a macro button for all this but i prefer type in the command line Benjo Quote Link to comment Share on other sites More sharing options...
SOliver Posted February 4, 2011 Share Posted February 4, 2011 (edited) Not sure if I understand the question properly but I believe something like this is what you are looking for (vlr-command-reactor nil '((:vlr-commandEnded . test))) (defun test(re arg /) (cond ((eq (car arg) "MTEXT") (setq ent(vlax-ename->vla-object(entlast))) (vla-put-layer ent "test") ) ;Additional conditions for different functions ;.......... ) ) Hope this helps, SOliver Edited February 4, 2011 by SOliver Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.