Is it possible to open up a component using the Ruby api?

I’d like to get the Ruby API to open up a component for editing… Is that possible?

I moved your topic to right category…


To open up the component instance path you can use Model#active_path=-instance_method, but it is introduced in Version:SketchUp 2020.0 only.

However you can “check” the current one with Model#active_path -instance_method
…and the Model#close_active instance method is used to close the currently active (open) group or component.

FYI, this is to enable manual editing. (ie, it is the equivalent of the user double-clicking an instance.)

But, API code can still modify a component definition’s entities collection without it’s instances open for edit by the user.

Wasn’t that the original question? :innocent:

…Otherwise you are right! :+1:

Just in case, … I volunteered a bit more information. :roll_eyes:


For even more info, we’ve discussed this many times in the past …

Yes, that was the original question. I want to limit the context inference of the tool.

Thx Dan, I’ll talk a look at those threads.

Maybe there is an event I can hook into when a component is opened up? Is there an API for that?

Hmmm. This looks promising:

Yes that’s it.