I work with the Building Information Modelling (BIM) process and want to automate this.
In Sketchup 2017 I can automate 3D modelling and adding information to components with a Ruby script. But I also want to automate the IFC export.
In the SketchUp Ruby API I can’t find the solution for automating an IFC export.
Are there any solutions? Or is this not possible yet?
You can iterate over the model and use the ComponentDefinition#get_classification_value method Class: Sketchup::ComponentDefinition — SketchUp Ruby API Documentation. I have been planning myself to make a more intuitive and user friendly BIM interface for quite some time but haven’t had the time for it yet.
If you have Pro and want to just call the Pro ifc exporter, try this in the Ruby Console.
Sketchup.active_model.export("C:/testmodel.ifc")
Check if the file exists.
@eneroth3 the ComponentDefinition #get_classification_value method doesn’t export the model to IFC.
This function get the IFC classification value from a component.
@jim_foltz I work with the SketchUp 2017 Pro version.
SketchUp does export something, but I can’t find the file.
I keep searching for the answer.