What sketchup is used to export or import ifc

for example : FreeCAD program used ifcopenshell to do this operation , is sketchup uses something like ifcopenshell to export or import ifc file ??

You need to use Sketchup Pro to be able to import/export ifc.

okey… any part of sketchup pro is responsible to do this operation ,
if any APIs or modules in sketchup can i using to make some extension

The only exposure for IFC import is the Sketchup::Model#import() method …

model = Sketchup.active_model
show_summary = true
filepath = UI.openpanel("Choose IFC file ...","*.ifc")
return unless filepath
status = model.import(filepath, show_summary)

SketchUp API Importer Options: IFC

Industry Foundation Classes (IFC)

  • No options are supported for this type on import.

The only exposure for IFC export is the Sketchup::Model#export() method …

if Sketchup.active_model.title.empty?
  filename = "Untitled"
else
  filename = Sketchup.active_model.title
end
filepath = UI.savepanel(
  "Choose IFC filename and location ...",
  "#{filename}.ifc"
)
return unless filepath
status = model.export(
  filepath,
  :hidden_geometry => true,
  :doublesided_faces => false,
  :ifc_mapped_items => true,
  :ifc_types => [ "IfcProject","IfcSite","IfcBuilding","IfcBuildingElementProxy" ]
)

SketchUp API Exporter Options: IFC

Industry Foundation Classes (IFC)

  • :hidden_geometry - Boolean to indicate whether to export hidden geometry.
  • :doublesided_faces - Boolean to indicate whether to export 2-sided faces.
  • :ifc_mapped_items - Boolean to indicate whether to export IFC mapped items.
  • :ifc types - An Array of strings indicating IFC elements to export. One or more of the following values can be in the array.
    • values: "IfcNonDefined", "IfcBeam", "IfcBuilding", "IfcBuildingElementProxy", "IfcBuildingStorey", "IfcColumn", "IfcCurtainWall", "IfcDoor", "IfcFooting", "IfcFurnishingElement", "IfcMember", "IfcPile", "IfcPlate", "IfcProject", "IfcRailing", "IfcRamp", "IfcRampFlight", "IfcRoof", "IfcSite", "IfcSlab", "IfcSpace", "IfcStair", "IfcStairFlight", "IfcWall", "IfcWallStandardCase", "IfcWindow"
1 Like

Also check this:

1 Like

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