ArgumentError: Cannot open instance path with locked sibling instances

I want to open a component with Ruby API active_path= method, but it raises an error said ‘Cannot open instance path with locked sibling instances’.
I checked the instance path, none is locked.

Logs:

real active_path is: [#<Sketchup::Group:0x000000037f8ee428>, #<Sketchup::ComponentInstance:0x00000003ebf565b0>]
x is locked: false
x is locked: false

Why does this happen?

Not sure, but could it mean there is another instance of a component in the path and that instance is locked?

Edit: I just checked, and that situation will return that error. See, for example, this trivial model example. Try to set up an active path using the component closest to the origin.

locked.skp (42.2 KB)

I you think about it, this makes sense. If you could open one instance while its sibling is locked, you would have a backdoor to modify the locked instance.

1 Like

Because we do not edit instances, we edit definitions which affects all instances. Therefore, all instances of a definition must be unlocked.