Components vs. Groups (Size of Model)

A couple things I’ve run across:

Groups acting like components: I think SketchUp “cheats” a bit and uses component instances for groups when it can. Then when the User opens one to edit, that’s when it gets made unique. I had problems in my MEP software where I changed a custom attribute on a group, and other copies of that group also got changed - not what I expected! I had to add a “Group#make_unique” into my attribute editing routine to avoid this.

Keeping the Component Browser clean: In FlatText, I want the glyphs (characters, etc.) to be components, and the assembled chunks of text to be groups. The User doesn’t need to know about these glyph definitions, but FlatText does. To avoid cluttering up the component browser, I use this:

# 160707 a little hack to hide glyphs in the component browser
if glyph
glyph.set_attribute(‘dynamic_attributes’, ‘_hideinbrowser’, true)
UI.refresh_inspectors
end

Thanks, ThomThom! :star_struck: