I work for an exhibition company and am in the process of cleaning up our component library. My issue is Sketchup adding #1 to component definitions.
Components are fine when opened on their own and the definition is correct, once imported into a new blank document or working model a #1 is added to the definition.
Looking in outliner it would appear a duplicate component is somehow being created which is causing the issue. I have tried exploding, purging and creating the component again but always end up with the same result. The file is fine when opened but not when added to a working document. Itās driving me nuts!!
Iāve added attached the offending file. I also have a couple of screenshots but cant add these as Iām new to the community 9544 @ 500 e.skp (15.1 KB)
What process are you using to bring the component into the new blank document or the working model? If you are using Import, then it makes sense that you should get this #1 appended. You have a component with the same name as the SketchUp file name. So if you import that component it comes in as a nested component. The parent and the child components cannot have the exact same name so Sketchup appends the number.
Hereās Outliner showing your component imported into a blank SketchUp model file.
Save your components into a local collection and then bring them into your new or working file from the Components panel. Example: I saved your component into one of my local collections. Then when I bring the component into a new file, it does not come in as nested.
Generally the reason would be that you are importing a component into a model that already has an unpurged component definition with the same name. Deleting components from the model doesnāt remove its definition that would remain in the In Model components definition list unless you purge it.
Ha! This must be new. It is a common mistake for people to create a component, save the containing file with the same name and post the file into the 3D Warehouse, creating a recursive reference. Previously this ended in a cryptic error message, sometimes even a crash.
I donāt remember when that changed. Iām not sure if itās better to let users import components made this way or to prevent them from doing it. Obviously crashing isnāt a good thing.
Itās so much easier to manage creating and saving components into local collections and then using them all from the Components panel.
If that workflow is a mistake, what would be a better approach? Should the file into which a component is āSave Asā'd be given a different name from the component-definitionās name (I hope not, that would be non-intuitive)? Perhaps I misunderstand the scenario.
That would be fine if either the user has no need for precision placement, or the userās model has sufficient inference points to allow SketchUpās Move tool-like features to place the new instance precisely.
In developing a very complex model, I use multiple SKP files for different ādevelopmentā portions of the overall model. When a portion is complete, I use the Copy command in the development model file, then Paste In Place within the overall model file to ensure accurate placement. I usually end up with a bunch of ā#1ā component definitions (such as when re-using common parts, nuts and bolts say). As an alternative to Copy+Paste In Place, perhaps I will remember to try using the Components panel technique, along with reference guides or similar to re-create the desired positioning.
The correct way would be to create the component, right-click on it and use the āsave asā function in the context menu. Then, giving the saved file the same name is no problem as there wonāt be an additional container layer. I meant that the common scenario (I have made the mistake myself) of starting a new model, creating a component and saving the entire model with the same name as the component is the erroneous one.
Thereās absolutely no reason that component placement canāt be precise. Proper placement of the componentās origin and orientation of the axes makes insertion as precise as you want it.
With proper setup itās easy to swap out components, too.
Or, what I find easier is to open the secondary pane in the Components panel and set it to the desired local collection. Then drag and drop the component thumbnail from In Model to the collection.
Thanks for all the replies! I have all my components stored in a folder and access them through the components tab in Sketchup.
It would indeed seem to be down to the file name and the component definition being the same.
I created a simple 1m x 1m x1m cube, created a component called āCubeā and saved it as āCubeā this produced the same behaviour when bringing into a new document.
If I change the definition to Cube 1m3 then all is good, is this the correct behaviour? can we really not have file name and component definition the same??
A component is a (little) SketchUp file, so the answer is no.
It would have to start inserting itself and never stop.
Humans can imagine this, but a computer doesnāt know when to stop.
You can use a group and name that the same as the filename.
I tend to name my āworking fileā WF_componentname and have all sorts of stuff inside (imported images, notes, preliminary versions, etc)
Then use āSave asā by rightclicking on the final component to save it in a resource folder.
Thanks for the help everyone. This has been driving me crazy for a while now, funny thing is a actually figured out pretty quick that if file name and component definition were different things were OK. If it wasnāt for my OCD tendencies and wanting things named the same I would have saved a lot of effort trying to correct something I couldnāt!!
The way they designed components to be saved. Either as I described before by dragging the component thumbnail from In Model to the local collection or by right clicking on the component and choosing Save asā¦ Neither of those methods will produce the nesting you are getting by making a component and then using File>Save to save the Sketchup file.
If you were making a bunch of related components to save for later use you could also use the Save as a local collection option from the Details menu in the Components panel
I am working with a component library stored on a server that myself and others need to use, that would surely mean āsave as local collectionā isnāt an option? Itās not something Iāve used before so please forgive me if Iām missing something simple.
When I created the previously mentioned test cube earlier I used āsave asā
Thanks for your patience DaveR, I thought I had resolved the issue and the method of using different file name and definition works fine. I just want to understand if this method is just a workaround or is Sketchup behaving as intended?