jim78b Posted June 12, 2019 Posted June 12, 2019 (edited) how i can edit the qleader command, when i press :le i draw a quick leader on a layer but I can't bring it back to layer 0, furthermore I have autocad mechanical which does not have the qleader command in the CUI interface but if i write LE i draw a quick leader! i create a new command qleader and write this code: ^C^C-layer;set;AM_5; _QLEADER;\\\ ^C^C_CLAYER 0; 1. don't back to layer 0 2. if i write LE command not recall my command! Edited June 12, 2019 by jim78b Quote
CyberAngel Posted June 12, 2019 Posted June 12, 2019 If you use LE, you're drawing a leader and then a piece of text. That leaves you with two separate entities. You must change the text to another layer when you change the leader's layer. Why not use Multileader instead? You get one entity instead of two and avoid this problem. Quote
jim78b Posted June 12, 2019 Author Posted June 12, 2019 yes but i want that the leader is on am_5 layer and then return to my 0 layer with colour :byblock Quote
ammobake Posted June 12, 2019 Posted June 12, 2019 So you want to draw it with am_5 layer as the current layer but you want the mleader to exist on layer 0 no matter what? Is that the gist? ChriS Quote
jim78b Posted June 12, 2019 Author Posted June 12, 2019 I want draw the leader on Am_5 layer and color set on bylayer but when finished to draw the leader in automatic return It possible on the 0 layer (i use default layer 0 with color set to byblock).My macro don't work at the end when i try to change layer to 0.... Quote
ammobake Posted June 13, 2019 Posted June 13, 2019 I might be pulling us back into circles here but... May I ask why you want these to be drawn on Am_5 layer and then switched to layer 0 when you could just draw mleader on 0 layer to begin with? What I would do is first create mleader style with the desired layering assigned to the text and the leader (layer 0 in this case). At that point it won't matter what the current layer is because your mleaders will always be on layer zero per the mleader style. If you need to change the layering of the mleaders you would change it in the mleader style menu (once) and everything would update. ChriS Quote
jim78b Posted June 13, 2019 Author Posted June 13, 2019 Ok but i can not choose on type of layer assign the leader in the menu ... Quote
CyberAngel Posted June 13, 2019 Posted June 13, 2019 Is there some company standard for your leader styles? Is that why you cannot create a style to do what you want? Is there a locked layer involved? Does the style not permit you to choose the layer you want? I don't quite understand the problem. Quote
jim78b Posted June 13, 2019 Author Posted June 13, 2019 because is annoying every time that i want to draw a leader change layer....and then return back to layer 0 Quote
BIGAL Posted June 14, 2019 Posted June 14, 2019 If you use lisp a bit easier making it a defun. using ^C^C-layer;set;AM_5; _QLEADER;\\\ is close but I would use clayer AM_5 you need to look at how many enters you do and how much input you do should be able to add "pause" so it will ask questions. or (getpoint) Quote
jim78b Posted June 14, 2019 Author Posted June 14, 2019 Ok thanks but i try with a macro but not work ...because at the end i want come back to layer 0 .with color byblock Quote
steven-g Posted June 14, 2019 Posted June 14, 2019 I'm not sure if I'm following this correctly, you want the leader on layer "AM_5" and then the text on layer "0"? If so try this macro ^C^C^C-layer;set;AM_5;;_QLEADER;\\\1;\^C^C_CLAYER 0;-ch;l;;p;la;0;; Quote
jim78b Posted June 14, 2019 Author Posted June 14, 2019 THANKS don't worry i explain wrong i only wanted to return on layer 0 Quote
SLW210 Posted June 14, 2019 Posted June 14, 2019 Did you bother to look at the LISP? It does exactly what you ask. Quote
jim78b Posted June 14, 2019 Author Posted June 14, 2019 (edited) Oh well thanks a lot but if the layer not exist It create the layer ? Edited June 14, 2019 by jim78b Quote
jim78b Posted June 14, 2019 Author Posted June 14, 2019 (edited) i try but sorry the layer remain on am_5 in this mode work : ^C^C_layer;m;AM_5;;_QLEADER;\\\;;^C^C_LAYER m 0;; but only if i click on the command icon every time i press right mouse button the layer window open... and if i write in the command line : LE ...the macro is not activate Edited June 14, 2019 by jim78b Quote
SLW210 Posted June 17, 2019 Posted June 17, 2019 I have moved your thread to the AutoLISP, Visual LISP & DCL Forum. Quote
ammobake Posted June 27, 2019 Posted June 27, 2019 LAYERTRANS is a neat new feature too that would force all objects or objects of specific types to specific layers no matter what but probably won't help you too much since I think it's only available in 2019 or higher. It has other uses. Like if you have a drawing that was based off an outdated template and your colors and linetypes are off (and you have like hundreds of layers) with one command it will compare everything to another cad drawing and match those layer properties throughout should you choose. This happens in design sometimes when other disciplines are starting with an old template with an old color scheme that doesn't even correspond to the current lineweight style. ChriS Quote
tombu Posted June 28, 2019 Posted June 28, 2019 There are 14 different settings that affect options for the qleader command. For a lisp to work consistently for multiple users you would need to set the options for number of vertices and either text or mtext using the qlset.lsp by Frank Whaley at Autodesk. It's been posted on this forum many times already: https://www.cadtutor.net/forum/search/?q=qlset I'd recommend resetting those settings at the end of the lisp to avoid upsetting another user whose settings aren't exactly the same as yours. 1 Quote
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.