I am editing some commands at the moment to set the layers etc before they are done, so for qleaders, i want this to be on the layer 'Dim'
I've changed the macro to;
-layer;set;Dim;^C^C_qleader
this works fine, exactly the way I want it to.
The only problem is it only works for the command fro the ribbon, it doesnt work when typing the qleader command.
Is there any way to apply it for both?
Solved! Go to Solution.
I am editing some commands at the moment to set the layers etc before they are done, so for qleaders, i want this to be on the layer 'Dim'
I've changed the macro to;
-layer;set;Dim;^C^C_qleader
this works fine, exactly the way I want it to.
The only problem is it only works for the command fro the ribbon, it doesnt work when typing the qleader command.
Is there any way to apply it for both?
Solved! Go to Solution.
Solved by Kent1Cooper. Go to Solution.
Solved by cadffm. Go to Solution.
Solved by Kent1Cooper. Go to Solution.
Hi,
>> it doesnt work when typing the qleader command
You might try to create a small LISP function which does the layer setting + the leader command start for you
(defun C:QL() (command "_-LAYER" "_MAKE" "XXX" "")
(command "_.QLEADER") )
This small part gives you a new command "QL" (you can name it as you like as long as it's not a already existing command name).
This command can be used in the menu as well as by typing using your keyboard.
- alfred -
Hi,
>> it doesnt work when typing the qleader command
You might try to create a small LISP function which does the layer setting + the leader command start for you
(defun C:QL() (command "_-LAYER" "_MAKE" "XXX" "")
(command "_.QLEADER") )
This small part gives you a new command "QL" (you can name it as you like as long as it's not a already existing command name).
This command can be used in the menu as well as by typing using your keyboard.
- alfred -
Basic AutoCAD has an option for always putting Dimensions on a Layer of your choice, whatever the current Layer, but apparently not Leaders. But I think some of the overlay programs have that kind of option for more things -- whether Civil3D [my assumption, from your avatar image] does, and if so whether Leaders are included, I don't know.
But you can make a new definition of the command to do it for you. Put this into acaddoc.lsp, so it will be loaded in every drawing:
(command "_.undefine" "QLEADER")
(defun C:QLEADER () (setvar 'clayer "Dim") (command "_.qleader"))
Then, no matter how you call up the command [from the ribbon, type in, other menu item, alias*, etc.], it will go to that Layer. You can do the same for LEADER, for when you want the "slow" variety.
It could be enhanced to save the current Layer when it's called, and set that current again after you're done, if you like.
*EDIT: I tried it, and I find that with the native QLEADER command undefined, the standard LE alias for it does not work, so if you want that, you'd have to make that a command, too:
(defun C:LE () (setvar 'clayer "Dim") (command "_.qleader"))
or with the earlier QLEADER new definition, just:
(defun C:LE () (C:QLEADER))
Basic AutoCAD has an option for always putting Dimensions on a Layer of your choice, whatever the current Layer, but apparently not Leaders. But I think some of the overlay programs have that kind of option for more things -- whether Civil3D [my assumption, from your avatar image] does, and if so whether Leaders are included, I don't know.
But you can make a new definition of the command to do it for you. Put this into acaddoc.lsp, so it will be loaded in every drawing:
(command "_.undefine" "QLEADER")
(defun C:QLEADER () (setvar 'clayer "Dim") (command "_.qleader"))
Then, no matter how you call up the command [from the ribbon, type in, other menu item, alias*, etc.], it will go to that Layer. You can do the same for LEADER, for when you want the "slow" variety.
It could be enhanced to save the current Layer when it's called, and set that current again after you're done, if you like.
*EDIT: I tried it, and I find that with the native QLEADER command undefined, the standard LE alias for it does not work, so if you want that, you'd have to make that a command, too:
(defun C:LE () (setvar 'clayer "Dim") (command "_.qleader"))
or with the earlier QLEADER new definition, just:
(defun C:LE () (C:QLEADER))
civil 3d; which is built on top of full autocad & map 3d
civil 3d; which is built on top of full autocad & map 3d
Hi,
>> (setvar 'clayer "Dim")
Just to add .. for that statement the layer "Dim" has already to exist in your drawing.
- alfred -
Hi,
>> (setvar 'clayer "Dim")
Just to add .. for that statement the layer "Dim" has already to exist in your drawing.
- alfred -
@Alfred.NESWADBA wrote:
....
>> (setvar 'clayer "Dim")
Just to add .. for that statement the layer "Dim" has already to exist in your drawing.
....
True, and I assume it does, since the macro in Post 1 only sets it, and "works fine" for the OP. But if it might not always, forcing it to, as in Post 2, can be included.
@Alfred.NESWADBA wrote:
....
>> (setvar 'clayer "Dim")
Just to add .. for that statement the layer "Dim" has already to exist in your drawing.
....
True, and I assume it does, since the macro in Post 1 only sets it, and "works fine" for the OP. But if it might not always, forcing it to, as in Post 2, can be included.
Hi,
>> True, and I assume it does, since the macro in Post 1 only sets it, and "works fine"
;)))
- alfred -
Hi,
>> True, and I assume it does, since the macro in Post 1 only sets it, and "works fine"
;)))
- alfred -
Hi All,
Thanks for all the replies @Kent1Cooper solution does the job, it means I don't need to edit the cui and forces the standard for all commands.
Thanks for all the suggestions.
This only applies to 2d qleaders etc, its going to be applied to dims, hatches, viewports etc
Civil 3d has the label and leader as one layer and the colour defined within the label.
Civil 3d is my main software, but I am also responsible for building a new set of cad standards for autocad users that work with both civil 3d and autocad (hence the question of forcing layer management)
Hi All,
Thanks for all the replies @Kent1Cooper solution does the job, it means I don't need to edit the cui and forces the standard for all commands.
Thanks for all the suggestions.
This only applies to 2d qleaders etc, its going to be applied to dims, hatches, viewports etc
Civil 3d has the label and leader as one layer and the colour defined within the label.
Civil 3d is my main software, but I am also responsible for building a new set of cad standards for autocad users that work with both civil 3d and autocad (hence the question of forcing layer management)
Hi All,
Hoping for some additional help in this regard, setting default layer for hatches;
(command "_.undefine" "Hatch")
(defun C:Hatch () (setvar 'clayer "Hatch") (command "_.Hatch"))
That bit works fine, but it runs the hatch command with HPDLGMODE set to 0 rather than the 1 that it is set to, so in effect it does not open the dialog box.
Any way to fix this?
Thanks in advance
Hi All,
Hoping for some additional help in this regard, setting default layer for hatches;
(command "_.undefine" "Hatch")
(defun C:Hatch () (setvar 'clayer "Hatch") (command "_.Hatch"))
That bit works fine, but it runs the hatch command with HPDLGMODE set to 0 rather than the 1 that it is set to, so in effect it does not open the dialog box.
Any way to fix this?
Thanks in advance
You know about HPLAYER and DIMLAYER or do you have an old version?
Sebastian
You know about HPLAYER and DIMLAYER or do you have an old version?
Sebastian
Nope I did not know of these! Thanks!
I knew of XREFLAYER but didn't know of the others.
Are there any others? One for viewports perhaps?
Nope I did not know of these! Thanks!
I knew of XREFLAYER but didn't know of the others.
Are there any others? One for viewports perhaps?
@Anonymous wrote:
.... it runs the hatch command with HPDLGMODE set to 0 rather than the 1 that it is set to, so in effect it does not open the dialog box.
Any way to fix this?
....
(command "_.undefine" "Hatch")
(defun C:Hatch () (setvar 'clayer "Hatch") (initdia) (command "_.Hatch"))
@Anonymous wrote:
.... it runs the hatch command with HPDLGMODE set to 0 rather than the 1 that it is set to, so in effect it does not open the dialog box.
Any way to fix this?
....
(command "_.undefine" "Hatch")
(defun C:Hatch () (setvar 'clayer "Hatch") (initdia) (command "_.Hatch"))
Can't find what you're looking for? Ask the community or share your knowledge.