Skip to content

Other CAD data formats

SKP

The SketchUp files can be read using the method ReadSKP. The method reads the data from the file and returns a flat Python list of ModelElement3D objects, which can be processed further in the script e.g., be added to a PythonPart and placed at a point, along a path or in a grid.

model_ele_list = AllplanBaseElements.CadDataFileReader.ReadSKP(skp_file_path,
                                                               AllplanBaseElements.eDesignPathLocation.OverrideFiles)

OBJ

The Wavefront OBJ file format is a simple data-format that represents 3D geometry alone, first developed by Wavefront Technologies. The elements are read from file by using ReadOBJ. Just as ReadSKP, this method will return a list of ModelElement3D objects, which can be processed further.

model_ele_list = AllplanBaseElements.CadDataFileReader.ReadSKP(skp_file_path,
                                                               AllplanBaseElements.eDesignPathLocation.OverrideFiles)

Example

For a complete usage of CadDataFileReader class, see the example PythonPart located in:

  • …\etc\Examples\PythonParts\BasisExamples\ExportImport\CadDataFileReader.pyp
  • …\etc\PythonPartsExampleScripts\BasisExamples\ExportImport\CadDataFileReader.py