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.

Frozen Bitmap image

Started by Hughaircraft1, January 22, 2015, 03:56:48 PM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

Hughaircraft1

I am trying to align a JPEG image to a line drawn with point polar, but the JPEG image is "frozen" such that I can not move or rotate it in any way. I previously was able to rotate the image, but now it is not possible. The layer that it is on is not locked. I don't know what I did  to produce this effect. I could start from scratch, but it may be a learning experience to determine what went wrong.
Hugh

Rob S

Hard to tell what could be the issue without the drawing file to test, can it be uploaded?

Have you tried deleting the image and re-inserting it?  This could be done on a copy of the original file, in case it screws up.
User since forever

Dr PR

Hugh,

What version are you using? Are you working in 2D or 3D? Can you select the image?

Phil
DesignCAD user since 1987

samdavo

#3
Hugh
I know you think that the jpeg is not locked, but just "to be sure, to be sure",  try running this macro, a.d3m (which unlocks everything!) - (edit) I should have said it unlocks everything that is visible, an improvement on the original macro that prl added.

a.d3m = manipulate All layers
PS
c.d3m = manipulate Current layer (only)
although to be honest, I never use c.d3m,
instead I use hotkeys, as below, which also change the working colour ...
1.d3m = layer 1 only (white / or black)
2.d3m = layer 2 only (red)
3.d3m = layer 3 only (brown)
etc

cheers
sam 

Dr PR

You can also just open the Layers dialog (L) and click "Unlock All." This unlocks all layers, even if they are not displayed.

Note: The little "Lock" icons don't change to show they are unlocked (bug).

Phil
DesignCAD user since 1987

Hughaircraft1

Phil, Bob and Sam,
I used the macro to unlock all the layers. and then enabled multi-level editing. This gave me back control of the image and lines that I had drawn. Thank you all for the help. Next I will try to align the image with a polar point produced line which should work. Thank you all for your help, and I won't trust those little unlock icons any more.
Hugh

Bob P

FWIW, the value of sys(26) controls the ability to manipulate layers.

sys(26)=0 'Manipulate all layers (it also effects non-visible layers, but you can't select them when they are not visible).

sys(26)=1 'Manipulate only the current layer

You can make buttons or write named macros to use the bare commands, or even type those at the command line.

DrollTroll

Actually, to the best of my knowledge, "Unlock All" only unlocks all VISIBLE layers. To show and unlock ALL layers, you'd need to first click "Show All", then "Unlock All".
25 years with DesignCAD

samdavo

#8
Quote from: Hughaircraft1 on January 23, 2015, 11:32:03 AM
a) I used the macro to unlock all the layers. and then
b) enabled multi-level editing.
Actually Hugh, you could be onto something with the second part of that sentence. (!)

I'm not even sure why anyone would have "enable multi-level editing" UNTICKED.  That just doesn't make sense in my philosophy, Horatio.   And it confuses "the logic of the layer dialog box" big time. 

i.e. If it is unticked, then even little open padlocks on other-than-current layers are irrelevant, i.e. they won't be selected. 

Good find,  Cheers,
sam

Quote from: DrollTroll on January 23, 2015, 02:58:23 PM
Actually, to the best of my knowledge, "Unlock All" only unlocks all VISIBLE layers. To show and unlock ALL layers, you'd need to first click "Show All", then "Unlock All".
Spot on DT. (now that I check);

And likewise BobP 's  sys(26)=0 only  affects visible layers.  (2 cents).   PS For some reason I find this doesn't always unlock all visible layers, EVEN IF 'multilevel editing' is enabled (??)

PS.  All that applies to the general case.  However, on this occasion, Hugh could presumably see the image that was not behaving.   
PS I'm talking V22.1 here.

DrollTroll

Sam, Sys(26) basically is the opposite of the "Enable multilayer editing" checkbox. If you set it to 1, multilayer editing is off, and you can only select objects on the current layer. If you set it to zero, Multilayer Editing is on; however, in this case you can still only edit objects on visible, unlocked layers (though a very few commands may violate this rule).
25 years with DesignCAD

samdavo

#10
DT
That all makes sense, thanks.   I will probably stick with my macros  (and I rarely even have to open the layer dialogue box) :)

However, one more tricky thing I have learnt here (from Hugh) is that with "enable multi-layer editing" unticked, the little padlocks in the dialogue box are no longer relevant.

in case anyone is interested,  I attach a jpeg called "question 1".   You will note that there are a series of wide coloured lines on various layers.   All are visible except layer 6 (magenta) - i.e. the bulb is turned off in the layer dialogue box, and that automatically means it is also locked.  The other layers are unlocked, hence a series of unlocked padlocks.   Layer 4 is current,

Question: -  If I try to select all, either by dragging a selection box around everything, or using Ctrl+A,  what will be selected?

Answer:  Because the "enable multi-layer editing" is turned off, you will only select the green line on layer 4. - ignoring the unlocked padlocks on other layers (2 cents)


Hughaircraft1

Thanks to all for their comments. I learned about things that I did not realize I was ignorant!
Hugh

samdavo

Hugh
A great example of how any old question, no matter how apparently simple, can result in interesting spin-offs.

Can I ask, do you suspect that your original problem was indeed due to unticking that "enable multi-layer editing" box?

Dr PR

DT,

"Unlock All" does unlock all layers, even hidden layers.

Here is a simple test to prove the point:

1. Draw objects on layers 1 and 2.

2. Group them.

3. Switch the active layer to layer 3.

4. Hide layer 1.

5. Try to select the group - you can't because layer 1 is locked (hidden).

6. Use "Unlock All" - don't make layer 1 visible.

7. To prove the point, now you can select the group even though part is hidden on layer 1 because layer 1 is no longer locked.

8. For further proof you can now move the entire group (including the hidden parts) to layer 3 with the Info Box.

****

All layers will remain unlocked until you either use "Lock All" or make a layer visible and then hide it again.

I really wish the show/hide and lock/unlock weren't coupled. That would allow us to permanently lock some reference layers that must never be changed without unlocking them if we enable display of those layers. As it is, any layer that is displayed is automatically vulnerable to accidental change. So after displaying the layer you have to remember to lock it again. PITA!

The visibility control is really an "editable" control because it effects both the display and editability of objects. But, as the above examples show, it is a PITA when working with multi-layer groups or with reference layers that must not be changed.

If you have a multi-layer group, with some parts hidden, and you don't remember what layer the hidden parts are on, the current hide/lock scheme means you must stop what you are trying to do and hunt for the specific hidden layer to display it before you can select the group. In large crowded drawings with dozens of layer this is a real annoyance.

I wish there was a way to "Unlock All" without having to bother with opening the Layers dialog. Wonder if you can assign "Unlock All" to a key combo or a toolbox button?

I also wish the locked/unlocked state was saved with the drawing so it was the same when you open a drawing as it was when you closed it last.

****

NOTE: Whatever you do, DO NOT CHANGE THIS! This is the only easy way to find those stray surface facets that get scattered to the wind by the solid Boolean operations. Unlock all, select the solid and use the Info Box to move all the scattered parts back to a single layer - and reset the material/color of the scattered parts if necessary.

Phil
DesignCAD user since 1987

samdavo

#14
Just looking at the function
y = layer(i) where i is the ith layer,
it would seem that it returns the value :-

(some edits from first posting) :-

0 if layer is    invisible and    empty        (and locked) -check
1 if layer is    invisible and    notempty    (and locked)
2 if layer is    visible and       empty         and locked  -check
3 if layer is    visible and       notempty    and locked   -check
4 if layer is    invisible and    empty        (and locked)
5 if layer is    invisible and    notempty    (and locked)  -check
6 if layer is    visible and       empty         and unlocked -check
7 if layer is    visible and       notempty    and unlocked -check
14 if layer is  visible and       empty         and unlocked    and current  -check
15 if layer is   visible and      notempty    and unlocked    and current.  - -check

(hope that is accurate - third try) - sorry it wasn't accurate - see reply  #27
I'm not even sure where you find this info - I have just done this by interrogating a drawing with a macro. (2 cents)

even numbers are empty
odd numbers are nonempty;

of the notemptys ...
1 and 5 are invisible
3, 7 and 15 are visible

of the emptys ...
0 and 4 is invisible
2, 6 and 14 are visible

y,         ODD(y),  ODD(y/2),  ODD(y/4)

1,            1            0             0          note 1 in the second column means nonempty
5,            1            0             1

3,             1            1             0          note 1 in the third column means visible
7 or 15,     1            1             1          note 1 in the fourth column means unlocked

............................

0,             0            0             0          note 0 in the second column means empty
4,             0            0             1          note 0 in the third column means invisible

2,             0             1            0           note 0 in the fourth column means locked
6 or 14,     0             1            1



My intention is to correct that with columns rearranged to look more like Dr Phil's binary coding in the next post  - Not sure I completely agree with him, but the principles that he espouses appear to be sound - and I'm sure he appreciates my commendation :)   :-


PS Hence what that macro a.d3m (or a simple.d3m) does is to find anything with y=3, i.e. the red set of data,  which means it is visible but locked,  and unlocks it. (by setting layer(i) = y = 6).

PS Note to prl

On first impression, it would seem that all you need do (on this occasion) is check if layer(i) = 3, then reset layer(i) to be = 6  ?? - and arguably no need to introduce ODD(y/2) etc  ?


i.e. instead of :-
if ODD(y)=1 and ODD(y\2)=1 and ODD(y\4)=0 then 'layer has entities, is visible, is locked
        Layer(i) = 6 'make layer visible and unlocked

use
if y=3 then 'layer has entities, is visible, is locked
        Layer(i) = 6 'make layer visible and unlocked
(2 cents)

(PS Or maybe I'm missing something?)