Jump to content

Modification of Dimension, Text, MText, Leader, ect..

Recommended Posts

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?



Link to post
Share on other sites

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.



Link to post
Share on other sites

Hi SOliver




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



Link to post
Share on other sites

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,


Edited by SOliver
Link to post
Share on other sites

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.

Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

  • Create New...