Import of CADmapper data

I imported open data with CADmapper. Now I have 1 component containing 4 main groups, buildings, park 1, park 2 and roads. In the group buildings there are maybe a 100 groups each containing 1 building. In order to use the extension DROP GC, the geometry needs to be a component. I can manually explode each group and make it a component, but for about 100 groups, it is not an efficient workflow. Can this be automated or is there an extension which does this job or can you set CADmapper to import components instead of groups?


The Drop GC extension should work on groups. You want to be sure that there is some geometry under the group axis for it to drop onto. You will also want to be sure you are in the buildings component context and have the individual building groups selected before activating the DropGC.


As @ChrisDizon said, I can confirm that DropGC works the same for groups as components.

With the group of building groups selected, you can paste this into the Ruby Console (without exploding) …

group = Sketchup.active_model.selection.grep(Sketchup::Group).first
unless group.nil?
  bldgs = group.entities.grep(Sketchup::Group)
  bldgs.each { |bldg| bldg.to_component if bldg.valid? }

On a side note (Since DropGC should work on groups): If you ever need to automate the conversion of groups to components, then Thom Thom’s Groups to Components extension might come in handy. :slight_smile: