Component Window: Save to Local Collection not working as expected with file>import and components made unique

I have found when importing components into a model and then selecting them and making them unique components, the Save to Local Collection doesn’t always save all the components in the model.

I discovered this behavior while doing an exercise in the the book SketchUp 2016 Hands-On: Basic and Advanced Exercises by Bonnie Roskes. Below is a similar set of steps which I found reproduces this issue.
If step 4 below is skipped, File>Import , the Save to Local Collection works as expected and all the components in the model appear in the Saved Collection folder.

An alternate way to reproduce this issue, is import three components into a SketchUp file, either by using file>import or drag and drop them into the model. I used a cube, a cone and a sphere. Make 2 copies of each component and make them unique. After doing Save to Local Collection observe similar results where the entire set of in model components are not saved, only one cube, one cone , one sphere is saved. Also, the name(s) of the skp files shown in the Saved Collection Folder are the original component names not what is shown in the component window for the Saved Collection.

Start a new SketchUp file

  1. Create a simple component with definition name cube.
  2. Move/Copy to make 2 copies.
  3. Right click the 3rd instance and do a Save As into a new local folder. The folder will have in it just cube.skp.
    Screen Shot 2018-11-25 at 8.24.25 PM.png
  4. Do a File-> Import and select the folder from above to import a new instance of cube.skp into the model.
  5. In the model, select the second of the cube components and make it unique.
  6. Edit the unique component and do a simple change like pull out one of the faces.
  7. After the edit, select it, Use Entity Info to change the component definition to cube pulled face .
  8. Select the 3rd instance of the cube component ( from step 3 above) and make it unique.
  9. Edit this unique component and do a simple change like add a circle pulled out from the face.
  10. After the edit, select it and Use Entity Info to change the component definition to cube with circle .
  11. Now the model appears as follows:
    TC6 before save local collection.png
  12. In the component window, select Save As Local Collection , create a new folder and select save.
  13. By definition, Save As Local Collection should save all the components in the model into the folder as individual skp files.
  14. The model view now appears as follows:
    TC6 after save local collection.png
  15. The Component Window displays only cube with circle as the only item in the saved folder. So Save As Local Collection only saved one of the three uniquely defined components in the model.
  16. The contents of the saved local collection folder shows only a file named cube.skp not cube with circle as shown above in the component window saved local collection view.

Screen Shot 2018-11-25 at 8.24.44 PM.png

The Saved Local collection didn’t save all the components in the model and what was saved in the folder didn’t agree with shown in the Saved Local Collection view of the Component window.

Later I found a simpler test as I don’t need to edit and rename the unique components in steps 5-10. Just select them, make them unique and use the default assigned definition component names (cube#1, cube#2).
As long as step 4 is performed the Saved Local Collection folder will Not contain all the components in the model.


I submitted this post back in November and not one reply. Perhaps someone from the SU team, like @Barry, can comment on this behavior. If this is a known bug it didn’t get fixed.
I just tested this using SU 2019 and I see the same issue with the Save As Local Collection feature.
Its very easy to reproduce (even though my original post was rather lengthy). Just start a new SketchUp file, import some components into the model, either by using File->Import, the 3D warehouse or drag and drop. Make a copy of each component. Select the copy and make it unique. Then in the components window, select Save as a Local Collection. Look at the Saved Components Collection. The components in the Saved Collection are not the same as the group shown in the components window in model collection. If the in model contains the original component and a unique version of the original both are not saved in the Local Collection folder.



I have been working on this issue for a large list of component we use for the company i work for, we just did a large overhaul of our massive libraries and needed to update them for some in house extensions. but we found the same issue when updating the naming conventions. here is the problem as far as i have been able to break it down. Note: i use the ruby console and API heavily so this is how i discovered our problem.

  1. you create a cube and make it a component and copy 3 times. so we have 3 instances of the “cube” definition. however this definition is only held in the current model instance of Sketchup, it is not yet a “cube.skp” meaning there is no file path for the newly created cube.

  2. you select 1 cube and “save as” in a local folder, now all 3 cubes have a “cube.skp” file path as part of their definition (discovered through the console)

  3. this is where the problem is. if you make the 3rd cube unique it’s name becomes “cube#1” in the entity info window, it is an unique component, with a unique name. But if you do a “save as” on this unique cube, it wants to save it as it’s original name “cube.skp” i believe this is because the definition path that is created for that component on it’s initial “save as” does not update when made unique. You will not find this problem on components that have not been saved to a local folder.

I believe this is a pretty serious problem for anyone who has build large libraries and updates the components and wants to update naming conventions. because now when you have 3 unique components derived from a source component definition that has been saved, the only thing that saves in the collection is the original definitions path.

I can give you the snippet of code i wrote to solve the issue for me. we just select our whole libraries and run this little code on them and it updates all their definition paths to their current entity info definition name and then the can be saved as a collection with the appropriate names.

I hope this makes sense, it’s actually a hard one to describe. i’m not surprised you have not had much response

1 Like

This topic was automatically closed 183 days after the last reply. New replies are no longer allowed.