I have been given this overly detailed model. Its an as-built that has nuts and bolts modelled in detail and its painful to use.
I need to drastically slim it down if I’m to work with it. everything is a unique component and a unique instance so I cant mass select and delete.
Things do seem to be some what colour coordinated. Is there an extension that can select all “objects” by material? All the elements are grouped so it would need to be able to make the selection deep inside grouping layers.
Are you intending to delete the nuts and bolts? You can right click on the component’s thumbnail in the Components panel and choose Delete. It will delete all instances of the component even if in nested components/groups.
I have installed selection toys and im not seeing this function. even in the extended UI. Do you know of any in-depth tutorial or could you provide a screen shot?
Are they all components, though? Maybe the easiest path is to remove each one via the Components panel. At least that doesn’t require burrowing into nests.
As in post a section to the forum? I’m not sure if I could share much info I wouldn’t want to disclose confidential client information. I’m not sure how much meta data would be carried over.
Give this a try into the ruby console - colordropper select the material you want to find groups of first.
model = Sketchup.active_model
material = model.materials.current
if material.nil?
UI.messagebox('No active material selected.')
return
end
results = []
walker = lambda do |entities|
entities.each do |ent|
if ent.is_a?(Sketchup::Group) || ent.is_a?(Sketchup::ComponentInstance)
# Add the entity if its instance-level material matches
results << ent if ent.material == material
# Recurse into child entities
child_entities =
ent.is_a?(Sketchup::Group) ? ent.entities : ent.definition.entities
walker.call(child_entities)
end
end
end
walker.call(model.entities)
model.selection.clear
results.each { |e| model.selection.add(e) }
puts "Selected #{results.size} group(s)/component instance(s) using material: #{material.display_name}"