DesignCAD 3D Max 2027 box
Now available

DesignCAD 2027

Hatches that follow their boundaries, an on-screen dial to turn your model, and a way to find any command by name, in a clean Windows 11 look.

Layer visibility and lock control has changed

Started by Dempsey, January 24, 2011, 10:40:30 PM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

Dempsey

In the layer pull-down menu (Layer Toolbox) a layer goes through these states starting at the layer being visible and unlocked:



light bulblockclick onresulting action
onunlockedlight bulblayer becomes invisible and locked. Correct.
offlockedlight bulblayer becomes visible and unlocked. Correct; returns to previous state!
onunlockedlocklayer remains visible, but is locked. Correct.
onlockedlight bulblayer becomes invisible and remains locked. Correct.
offlockedlight bulblayer becomes visible and remains locked. Correct; returns to previous state!
onlockedlight bulblayer becomes invisible and remains locked. Correct.
offlockedlockNothing happens!!! ERROR; layer should become visible and unlocked!!!
offlockedlock (second time)layer becomes visible and unlocked. STRANGE; this should have happened on the first click!!!
onunlockedlight bulblayer becomes invisible and locked. Correct.
offlockedlocklayer becomes visible and unlocked. Correct; returns to previous state!

Basically, the lock/unlock state of the layer is remembered when the layer is made invisible/visible. This is how it is supposed to work in V20.1.
Dempsey

Dr PR

Locked and invisible are two distinct unrelated things!

When the layer is visible it can be edited - when not visible it cannot be edited.

When not locked it can be edited, when locked it cannot.

The idea should be that a user can lock a layer to protect it from accidental change, and that locked state should be permanent until the user deliberately unlocks it again. Period! Changing layer visibility should have no effect upon the locked state. Period!

In current versions disabling visibility in an unlocked layer causes the layer to be locked when it is made visible again. THIS IS A GROSS BUG!

When files are opened all invisible layers are automatically locked. THIS IS A GROSS BUG!

I very strongly disagree that clicking on the lock symbol should change visibility. Likewise, selecting "Unlock All" should NOT make all layers visible. If you want layers to be visible, use the lightbulb for the specific layer or "Show All" for all layers.

Selecting "Show All" or "Hide All" should not change the unlocked/locked state of any layer.

The visibility and locked states of layers should be saved with the drawing, and they should be restored exactly as saved when the drawing is opened again. Period!

This has been screwed up for several versions now!

****

Another side to this is object selection. If an object (group or solid) exists on two or more layers and one of those layers is hidden, should you be able to select the visible parts of the object? If so, should the entire object be selected? You don't want to move or delete just parts of a group or solid, do you?

This actually is a significant question. Occasionally during a solid Boolean operation DesignCAD screws up and sends parts of the resulting solid off into never-never land (bug). If you don't know which of the layers the missing parts are on you could have quite an Easter egg hunt. As it happens, every instance of this bug I have observed put the wayward pieces on layer 0 (zero). For this reason I NEVER use layer 0. So, if an asterisk appears by Layer 0 in the Layers dialog I know I need to retrieve the missing pieces and put them back where they belong. But where is that? Again, if the other parts are on hidden layers I must track them down. Since the wayward pieces are often individual facets of a grid, and there can be tens of thousands of facets in many grids, figuring where the missing facets should go can be quite difficult. Just making all layers visible isn't much help.

The solution I use is "Unlock All" in the layers dialog. This makes it possible to select the entire solid, even if parts of it are scattered on hidden layers, and then use the Info Box to put it all where I want it. In this case you can select objects on hidden (but not locked) layers.

If you were unable to select groups or grids with parts on on hidden layers it would be extremely difficult to restore wayward facets to where they belong. I speak from much experience!
DesignCAD user since 1987

Lar

#2
Doc, parts of your post seem to be saying that an invisible layer should be able to be unlocked by the user but remain invisible. This may be possible in other cad software (I think acad works this way but I never investigated the implications) but traditionally, in dcad an invisible layer was always locked as well. A layer invisible-but-unlocked would mean that while making selections you could be selecting things that you can't see and possibly deleting things unintentionally (or whatever command you call up next).

I agree with you that the locked status of layers should remain until the user changes it, except that making a layer invisible should also lock it. However making that layer visible again should return the lock status to what it was before it was made invisible.  Generally this is how dcad works.. prior to v20.1, at least. In 20.1 once you save and close the file, upon reopening all invisible layers are locked. This should not be, in my opinion. I'm not sure how it worked prior to 20.1.

In terms of multi-layered groups and solids, here's a tip to finding out which layers the parts reside on: copy the group to the clipboard... open a new file and paste the group in... open the layer dialog and set the Filter to 'active layers only'. Only the layer with entities will be displayed (plus the current layer, which may or may not contain entities).

To new users using nested groups (my info may be outdated since I haven't used nested groups for a long while):
For using the info box to get a multi-layered nested groups on one layer, the fact that the group is nested is considered an entity and it resides on the layer that was current when the nested group was defined. However, the info box does not access this info so its layer is not changed with the entities of the group, so this does not solve the problem.

Here is a link to a forum post with a macro I wrote to solve the problem:
http://forum.designcad.com/index.php?topic=1854.msg9530#msg9530

Lar




Dr PR

Lar,

Not exactly. You shouldn't be able to select or edit edit objects on invisible layers (see caveat below). But this isn't the same as locking a layer.

The purpose of locking a layer is to prevent it from being changed until the user deliberately unlocks it. Changing visibility should not change the locked status. Otherwise, every time you make a previously locked layer visible you would have to lock it again, that that is unnecessary work, and it makes no sense. This is silly!

A good example is reference lines. I usually create a layer with guide lines for a drawing. This may include a drawing specific ruler, general outlines, etc. In some cases there are many reference lines on this layer. Everything in the drawing is positioned relative to these reference lines. After it is created I DO NOT want to edit it, so I lock it. I want it locked forever. However, I turn the display of this layer on and off many dozens of times while working on the drawing. I DO NOT want to have to lock the layer every time I make it visible again - that is a lot of unnecessary work and a distraction to the drawing process. And if these reference likes were accidentally changed the entire drawing could be screwed up. This is why Locked layers were invented. Once locked, it should stay locked!

The logic is very simple:

             Unlocked  Locked
Visible      Edit        No edit
Invisible   No edit    No edit

Note: In this sense "Edit" means both selecting and modifying. You cannot select an object on a locked layer, regardless if it is or is not visible. If you can't select it, you can't edit it, delete it or move it.

The one caveat is for groups or solids that have parts on multiple layers (this is something I never do). If all layers are visible but parts of the multi-layer object are on locked layers, can you select the object by snapping to a part that is on an unlocked layer? If part of an object is on an invisible layer that is not locked, can you select the entire object by snapping to a visible part?

Personally, I think solids should not be allowed to exist on multiple layers.

Groups are another matter. IF nested groups worked correctly it would be nice to arrange subassemblies (groups) on several layers and then group them all as a single assembly. Then different subassemblies could be hidden by turning off the layer display, but the whole assembly could be moved or deleted if all parts are on unlocked layers (even if some parts are hidden).

The prime requirement is that parts of solids or groups cannot be moved or deleted independently of other parts of the solids or groups. For this reason maybe you shouldn't be able to move or delete a solid or group with parts on hidden layers (like the logic diagram shows).

If you allow solids or groups with parts on hidden and unlocked layers to be selected (which you currently cannot do in DesignCAD V20.1) the entire object, including parts on hidden layers) should become visible so you know just what you selected.

****

I really don't care how the program has worked in the past as far as locked/hidden layers work. The way it works now is a pain in the posterior and doesn't make any sense.

Before you make an argument against change just because "that's the way it is done," first you should argue that dimensions should never have been changed (you might get my support on that) or that airplanes should all be propelled with propellers.
DesignCAD user since 1987

Lar

Doc, I agree with you 100% that visible layers should stay locked if locked by the user and in my experience this is how dcad works.

In fact, in my post above I lamented that visible-and-unlocked layers that were made invisible (and therefor locked) before saving remained locked when made visible after reopening the file (to those who can't follow that sentence: I apologize... but that's it in a nutshell). I tested this yesterday before posting but today the tested layer became unlocked when made visible after reopening the file (further apologies. In other words: yesterday bad, today good!).

What I was saying in my previous post was that it seemed you wanted an invisible layer to remain unlocked until the user locked it.

Lar

Dr PR

Lar,

No, I do agree with you, but yes, I didn't understand.

The locked state is lost when a file is saved and closed. Just another thing to put on the list of things to be saved with the drawing.

I am not certain, but I think there are some operations that will unlock a layer during an edit session. I'll watch for it and see if I can find an example. I know for certain that it doesn't always happen just because you make a layer invisible and then make it visible again. But occasionally I discover layers that were locked by the program and not by me (possibly at load time if the layer was invisible), and sometimes my locked layers become unlocked.
DesignCAD user since 1987