Can I hide all edges within a multi-level component?

Hi folks.

I’m dealing with components of houses imported from Archicad.
When they come through as SKP files they are in hundreds of components (each piece of timber, each window pane). I don’t particularly want to explode and reorganise them.

I’m looking for a quick way to make all their edges hidden, without having to go into each component and manually select and hide the edges.

Is there a quick way of doing this? maybe a ruby script?


Why don’t you change the style? You can hide edges.

If you want to hide all the edges in the model, you can do the setting in Style, and if you want to hide the edges only from certain groups/components (even nested ones) without opening them for editing, you can use the Curic Deep Select extension.

1 Like

A quick one:
Copy-paste this code below to Ruby console and hit Enter.
You will get a menu in “Extensions”> “Hide edges” and “Unhide edges”.
Select the entities which you want to make all their edges hidden (or visible). Choose the corresponding menu above. All edges will be processed, recursively inside nested components/groups too.
The amount of processed edges will be printed to console.
You can undo it.
As usual: No warranties, Use your own risk.

module Dezmo::Hide_Edges
  extend self
  def edges_visible( state, ents )
    ents.each { |e|
      if e.is_a?( Sketchup::Edge )
        e.visible = state
        @count += 1
      elsif e.is_a?( Sketchup::ComponentInstance ) || e.is_a?( Sketchup::Group )
        edges_visible(state, e.definition.entities )

  def run( state = true )
    model = Sketchup.active_model
    sel = model.selection
    return UI.messagebox "Please select entities!" if sel.empty?
    @count = 0
    op_name = state ? "Edges unhide" : "Edges hide"
      edges_visible( state, sel.to_a )
    puts "#{op_name} #{@count}"
  unless defined?(@ui_loaded)"Plugins").add_item("Hide edges") { run false }"Plugins").add_item("Unhide edges") { run }
    @ui_loaded = true
1 Like

Amazing, thank you!

This will be such a time saver for me.

Hiding edges has a very significant benefit to graphics performance for larger/complex models.

1 Like

I know there are occasions where SketchUp’s renderer is to blame for poor performance - having too many edges visible slows things to a crawl, but you need the edges if you are to carry on working on the model.
Tags and hiding things is one way to deal with it, but sometimes you simply just don’t need the edges to exist on the model.

You may try this:

1 - With all edges visible, create a scene and call it as you want, for example, Edges On. Uncheck the box labeled Camera position to avoid loosing a carefully composed view.

2 - Open the Styles Window or Style Tray and create a new style.

3 - Hide the edges and profiles.

4 - Update that new style.

5 - Create a new scenes and call it as you want, for example, Edges Off.

That’s it. From now on, you can just click on the appropriate scene tab to hide or show the edges.

I know in many cases you might have some ridiculous plant model or high poly chair which drags everything down and you basically never ever need the edges to exist for that object in SketchUp - perhaps your end goal is to take it into a renderer.
The simple answer would be “don’t use them” however in reality this isn’t always possible.

I know that’s why I will physically hide the edges in a component - using scenes or tags in itself causes other judders , pauses or feeling of instability or issues in the model as you switch.

Some of these issues will be significantly reduced in SU 2024, but also using edges as a visual representation of an angle, edge or boundary will also not be the only way, so per object control may be more useful than ever…