Select locked objects!


#1

Hi,guys,Can you give me a script code that can select objects locked? Thank you in andvance!


(Dale Fugier) #2

You cannot select locked objects…because they are locked.

What are you trying to do?


#3

I want unlock the object specified, I don’t want to find it’s layer and unlock the layer.I just want to select the locked object and get it’s layer the unlock then layer by code!


(Dale Fugier) #4

If you are using RhinoScript, then you can use either AllObjects or LockedObjects to get every object or just the locked objects, respectively. Once you have these objects, you can use the UnlockObject or UnlockObjects methods to unlock them.

http://4.rhino3d.com/5/rhinoscript/index.html

Does this help?


#5

If i lock many layers, I just want select the locked object i specified and get it’s layer to unlock!
Could you add a parammeter to getobject function to allow select the locked object?


(Dale Fugier) #6

No we cannot because you cannot pick locked objects. If you could pick them, then they wouldn’t be locked. :wink:


#7

A script could hide all unlocked objects, unlock all locked objects and layers, wait for the selection, get the layer(s) then lock the objects and layers again and then show the objects that were hidden again. Then Unlock the layer(s) and select the object(s)


#8

Thank you. it’s a good circuity solution!