What sketchup is used to export or import ifc


#1

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


#2

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


#3

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


#4

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.

#5

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"

#6

Also check this:


#7

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