I am performing some operations on component/group but I want to skip nested component/group if present inside it.
Regarding this I want identify that nested objects so that I can skip it.
Is there any functionality is available in Sketchup Ruby API where I can identify nested components/groups inside it ?
Where instance is the group or component instance:
# Get the definition's entities collection for the instance:
ents = instance.definition.entities
# Iterate the definition's entities collection:
ents.each do |entity|
# Skip any component or group instances:
next if entity.respond_to?(:definition)
#
# ... Act upon the other kinds of Drawingelements here ...
#
end