How can I extract the 3d models used in a scene?

Hello everyone,

I have a few hundreds of SketchUp files which are scenes comprised of several other 3d models, for example, imagine a scene with a building, a car and a few trees. I’d like to extract the building out of this scene. Do you have any suggestions to automate this process? For example, is there a way to export all the models used in a scene into separate files, i.e., a building file, a car file, and a few tree files, for the case of the previous example?

I am more of a programmer than a designer. I know that there is a Ruby API, but I have not worked with it so I don’t know its capabilities. I have not worked with SketchUp either, so I don’t know if the information I am looking for are even preserved.

Any suggestions are much appreciated!

I’m not aware of any way to automate many saves at once. But it’s as easy as right-clicking any components in the model that you want to save and then selecting ‘save as’…note this works for components only so make any groups a component first and you’re good to go.

Hello
I don’t know about automation but here’s the manual process.
Firstly, scenes are simply a product of a Sketchup model. So hopefully you have the Sketchup model. That’s where all the other models will reside. Scenes do not contain models…only a Sketchup Model will.
Models within Sketchup models are called Components. You don’t extract them, you you SAVE AS.
FOLLOW THE STEPS BELOW.

Step 1. Right click on one of the items you want to “,extract”. Select Entity Info. There it will tell you if it is a COMPONENT.
Step 2. If it is a component, simply right click on it and select SAVE AS ,from the menu that pops up. Navigate to where you want to save and click Save.
Step 3. If it doesn’t show as a component in Entity Info, right click on it and select Make Component. Now do Step 2.
REPEAT.
Chris

I often refer to components as ‘little SketchUp files’ that reside in a larger Model.
These components are in the ‘In Model’ collection.
A quick way to get all the components as seperate files is to ‘save collection as’ an option in the little blue detail button in the component panel.

These components are being saved with the components axis being the (if opened) Axis origin .
This origin will also be the insertion point when inserted in a (larger) model.

If you want to compose it automatically, you will need to know a little more about ruby.

@sasantavakkol How did you get all your components into hundreds of your models without first having them as members in a local component library (collection) ?

And yes it can be done with SketchUp Ruby.

Thanks everyone for the answers.

I did not generated the models, I collected them (3dwarehouse) and I would like to save the building separately, by getting rid of all the other objects in the scene. As I said, I am a programmer. I just used sketchup yesterday for the first time :slight_smile:

Looking at the files that I have, seems that in most cases the building is not a component by itself. So I am thinking of removing all instances of components in the scene and then hopefully end up with only the building. Doesn’t sound promising, but can’t come up with any better plan.

Spending some time getting to understand the software first might help you in your pillaging.

2 Likes

@sasantavakkol

You can try out the “CG Adjust” extension. One of its features is to export each component in a selection as a separate skp file. If you only want to isolate one item, you could also just right click on the single component and select “save as” in the context menu

CD