Ribbon or DCL for all layers.

Ribbon or DCL for all layers.

fernando_ortizmn
Participant Participant
354 Views
14 Replies
Message 1 of 15

Ribbon or DCL for all layers.

fernando_ortizmn
Participant
Participant

Hi, would it be possible to have a ribbon or dialog box (DCL) that shows all available layers, so that when I select a polyline I can assign it the desired layer with a single click?

0 Likes
Accepted solutions (1)
355 Views
14 Replies
Replies (14)
Message 2 of 15

paullimapa
Mentor
Mentor

Any reason for not using one of the following methods:

1) the layer list from Layers Toolbar?

paullimapa_1-1757827069066.png

paullimapa_2-1757827099645.png

paullimapa_3-1757827114163.png

 

2) Menubar>Layer list

paullimapa_4-1757827261480.pngpaullimapa_5-1757827306885.png

 

3) the layer list selectable from the Properties window?

paullimapa_0-1757826765843.png

 


Paul Li
IT Specialist
@The Office
Apps & Publications | Video Demos
0 Likes
Message 3 of 15

Kent1Cooper
Consultant
Consultant

I always use the pull-down in the Layer area of the ribbon:

Kent1Cooper_0-1757845606538.png

BUT be aware that what appears in that pull-down list is determined by the Filters setting in the Layer Manager.  Pick on the Layer Properties box at left above, and in the Layer Manager, check the Filters:

Kent1Cooper_1-1757845756608.png

Depending on the drawing, you get different choices, always including All and All Used Layers as shown, or if there are Xrefs, All non-Xref Layers is an option, etc.  The same filtering is applied to the pull-down in the ribbon.

Kent Cooper, AIA
Message 4 of 15

ВeekeeCZ
Consultant
Consultant

There are two built-in commands available, both of which use DCL.

LAYMCH

COPYTOLAYER

0 Likes
Message 5 of 15

fernando_ortizmn
Participant
Participant

I have many circuit paths as polylines, and it's complicated to assign each layer to its own layer because I have to pull down the menu, search for its name, and, if I get confused, repeat the same action. That's why I wondered if it was possible to have a ribbon with all the layers, or layers to choose from, so I could assign the layer to the polyline more quickly. Select the polyline, click on the layer, and that's it.
I use a LISP that gives me the name or information of the layer and the total sum of the polyline.

0 Likes
Message 6 of 15

Kent1Cooper
Consultant
Consultant

@fernando_ortizmn wrote:

.... I wondered if it was possible to have a ribbon with all the layers, or layers to choose from, so I could assign the layer to the polyline more quickly. Select the polyline, click on the layer, and that's it. ....


If pulling down the Layer list is too much, are you talking about something that would be all out there taking up enough screen screen space to have all Layers represented, all the time?  How many Layers are you talking about?

But if you have few enough Layers that it would not be cumbersome, I think this could be done with a Tool Palette.

Kent Cooper, AIA
Message 7 of 15

ВeekeeCZ
Consultant
Consultant

@Kent1Cooper wrote:


..., I think this could be done with a Tool Palette.


 

If the layer list were the same (standardized) across all drawings, that would be my approach.

Message 8 of 15

fernando_ortizmn
Participant
Participant

It would be ideal if, as shown in the image, I could assign the layer by simply selecting the polyline and clicking or double-clicking the layer name in the Layer Properties Manager. However, this isn't currently possible: I have to select the layer and then use the LAYCUR command to assign it. This becomes very slow when I need to assign layers to many polylines.

 

fernando_ortizmn_0-1757874247926.png

 

0 Likes
Message 9 of 15

paullimapa
Mentor
Mentor
Accepted solution

try this lisp using dcl 

(load "DDCHL")
DDCHL

 Then select objects

list box appears

paullimapa_0-1757876800107.png

 

hit letter on the keyboard to jump to the first letter of layer name

you can double click a layer to complete selection 

 


Paul Li
IT Specialist
@The Office
Apps & Publications | Video Demos
Message 10 of 15

komondormrex
Mentor
Mentor

komondormrex_0-1757877501659.png

 

Message 11 of 15

ВeekeeCZ
Consultant
Consultant

Try this line

 

(progn (initcommandversion) (command-s "_.laymch" (ssget) "" "_n"))

 

OR posibly

(defun c:LayChangeDig () (progn (initcommandversion) (command-s "_.laymch" (ssget) "" "_n")) (princ))

Message 12 of 15

paullimapa
Mentor
Mentor

nice catch..i've updated the lisp


Paul Li
IT Specialist
@The Office
Apps & Publications | Video Demos
Message 13 of 15

paullimapa
Mentor
Mentor

I like this very simple one and a major plus that the dialog box is stretchable.

Too bad there's no setting to filter out certain layers from the list like DEFPOINTS


Paul Li
IT Specialist
@The Office
Apps & Publications | Video Demos
Message 14 of 15

fernando_ortizmn
Participant
Participant

It works great.
You could only view the layer filter currently in use and not see unnecessary layers.
I'm still very grateful to both of you for your support.

 

0 Likes
Message 15 of 15

Sea-Haven
Mentor
Mentor

Just my $0.05 how many layers are you using to draw the plines on ? As suggested, a Pop menu, Ribbon or tool palette would have your pline option but with the correct layer names to be used in a dcl. .Or just a command call "`Pcol". If you look at this image all objects are on correct layer with no user input as you draw objects eg a wall of 4 lines on 4 layers.

SeaHaven_0-1757897907664.png

We also had this in our dwt. Would just move to a suitable location and use set current layer. A very simple answer.

 

SeaHaven_1-1757897996292.png

Not true code but example of Pcol

 

(defun c:pcol ( / lst)
(setq lst '(put all layer names here))
(call your dcl list box and choose layer)
(setvar 'clayer chosenlayer)
(command "pline")
)

 

 

0 Likes