Sample Code Revit Batch Processor 1.1.11 documentation

Contents:

This Page

duHast.Revit.Exports.Utility package

Submodules

duHast.Revit.Exports.Utility.export_ifc_config_2019 module

This module contains a number of helper functions to get the IFCExportConfig in varies versions of Revit.

duHast.Revit.Exports.Utility.export_ifc_config_2019.ifc_get_third_party_export_config_by_view_2019(ifc_version, ifc_settings)

Function returning an IFC export configuration for Revit 2019 using the open source third party IFC exporter plug in supported by AutoDesk

This configuration allows export by view. If ifc_version is None, IFCVersion.Default will be used.

Parameters:

ifc_version (Autodesk.Revit.DB.IFCVersion) – The ifc version used for the export.

Returns:

An IFCExportConfig object.

Return type:

BIM.IFC.Export.UI.IFCExportConfiguration

duHast.Revit.Exports.Utility.export_ifc_config_2019.ifc_get_third_party_export_config_by_model_2019(ifc_version, ifc_settings)

Function returning an IFC export configuration for Revit 2019 using the open source third party IFC exporter plug in supported by AutoDesk

This configuration allows export the entire model. If ifc_version is None, IFCVersion.Default will be used.

Parameters:

ifc_version (Autodesk.Revit.DB.IFCVersion) – The ifc version used for the export.

Returns:

An IFCExportConfig object.

Return type:

BIM.IFC.Export.UI.IFCExportConfiguration

duHast.Revit.Exports.Utility.export_ifc_config_2020 module

This module contains a number of helper functions to get the IFCExportConfig in varies versions of Revit.

duHast.Revit.Exports.Utility.export_ifc_config_2020.ifc_get_third_party_export_config_by_view_2020(ifc_version, ifc_settings)

Function returning an IFC export configuration for Revit 2020 using the open source third party IFC exporter plug in supported by AutoDesk

This configuration allows export by view. If ifc_version is None, IFCVersion.Default will be used.

Parameters:

ifc_version (Autodesk.Revit.DB.IFCVersion) – The ifc version used for the export (2x3 etc…).

Returns:

An IFCExportConfig object.

Return type:

BIM.IFC.Export.UI.IFCExportConfiguration

duHast.Revit.Exports.Utility.export_ifc_config_2020.ifc_get_third_party_export_config_by_model_2020(ifc_version, ifc_settings)

Function returning an IFC export configuration for Revit 2020 using the open source third party IFC exporter plug in supported by AutoDesk

This configuration allows export the entire model. If ifc_version is None, IFCVersion.Default will be used.

Parameters:

ifc_version (Autodesk.Revit.DB.IFCVersion) – The ifc version used for the export.

Returns:

An IFCExportConfig object.

Return type:

BIM.IFC.Export.UI.IFCExportConfiguration

duHast.Revit.Exports.Utility.export_ifc_config_2021 module

This module contains a number of helper functions to get the IFCExportConfig in varies versions of Revit.

duHast.Revit.Exports.Utility.export_ifc_config_2021.ifc_get_third_party_export_config_by_view_2021(ifc_version, ifc_settings)

Function returning an IFC export configuration for Revit 2021 using the open source third party IFC exporter plug in supported by AutoDesk

This configuration allows export by view. If ifc_version is None, IFCVersion.Default will be used.

Parameters:

ifc_version (Autodesk.Revit.DB.IFCVersion) – The ifc version used for the export.

Returns:

An IFCExportConfig object.

Return type:

BIM.IFC.Export.UI.IFCExportConfiguration

duHast.Revit.Exports.Utility.export_ifc_config_2021.ifc_get_third_party_export_config_by_model_2021(ifc_version, ifc_settings)

Function returning an IFC export configuration for Revit 2021 using the open source third party IFC exporter plug in supported by AutoDesk

This configuration allows export the entire model. If ifc_version is None, IFCVersion.Default will be used.

Parameters:

ifc_version (Autodesk.Revit.DB.IFCVersion) – The ifc version used for the export.

Returns:

An IFCExportConfig object.

Return type:

BIM.IFC.Export.UI.IFCExportConfiguration

duHast.Revit.Exports.Utility.export_ifc_config_2022 module

This module contains a number of helper functions to get the IFCExportConfig in varies versions of Revit.

duHast.Revit.Exports.Utility.export_ifc_config_2022.ifc_get_third_party_export_config_by_view_2022(ifc_version, ifc_settings)

Function returning an IFC export configuration for Revit 2022 using the open source third party IFC exporter plug in supported by AutoDesk

This configuration allows export by view. If ifc_version is None, IFCVersion.Default will be used.

Parameters:

ifc_version (Autodesk.Revit.DB.IFCVersion) – The ifc version used for the export.

Returns:

An IFCExportConfig object.

Return type:

BIM.IFC.Export.UI.IFCExportConfiguration

duHast.Revit.Exports.Utility.export_ifc_config_2022.ifc_get_third_party_export_config_by_model_2022(ifc_version, ifc_settings)

Function returning an IFC export configuration for Revit 2022 using the open source third party IFC exporter plug in supported by AutoDesk

This configuration allows export the entire model. If ifc_version is None, IFCVersion.Default will be used.

Parameters:

ifc_version (Autodesk.Revit.DB.IFCVersion) – The ifc version used for the export.

Returns:

An IFCExportConfig object.

Return type:

BIM.IFC.Export.UI.IFCExportConfiguration

duHast.Revit.Exports.Utility.export_ifc_config_2023 module

This module contains a number of helper functions to get the IFCExportConfig in revit versions 2023 of Revit.

duHast.Revit.Exports.Utility.export_ifc_config_2023.ifc_get_third_party_export_config_by_view_2023(ifc_version, ifc_settings)

Function returning an IFC export configuration for Revit 2023 using the open source third party IFC exporter plug in supported by AutoDesk

This configuration allows export by view. If ifc_version is None, IFCVersion.Default will be used.

Parameters:

ifc_version (Autodesk.Revit.DB.IFCVersion) – The ifc version used for the export.

Returns:

An IFCExportConfig object.

Return type:

BIM.IFC.Export.UI.IFCExportConfiguration

duHast.Revit.Exports.Utility.export_ifc_config_2023.ifc_get_third_party_export_config_by_model_2023(ifc_version, ifc_settings)

Function returning an IFC export configuration for Revit 2023 using the open source third party IFC exporter plug in supported by AutoDesk

This configuration allows export the entire model. If ifc_version is None, IFCVersion.Default will be used.

Parameters:

ifc_version (Autodesk.Revit.DB.IFCVersion) – The ifc version used for the export.

Returns:

An IFCExportConfig object.

Return type:

BIM.IFC.Export.UI.IFCExportConfiguration

duHast.Revit.Exports.Utility.export_ifc_config_2024 module

This module contains a number of helper functions to get the IFCExportConfig in revit versions 2024 of Revit.

duHast.Revit.Exports.Utility.export_ifc_config_2024.ifc_get_third_party_export_config_by_view_2024(ifc_version, ifc_settings)

Function returning an IFC export configuration for Revit 2024 using the open source third party IFC exporter plug in supported by AutoDesk

This configuration allows export by view. If ifc_version is None, IFCVersion.Default will be used.

Parameters:

ifc_version (Autodesk.Revit.DB.IFCVersion) – The ifc version used for the export.

Returns:

An IFCExportConfig object.

Return type:

BIM.IFC.Export.UI.IFCExportConfiguration

duHast.Revit.Exports.Utility.export_ifc_config_2024.ifc_get_third_party_export_config_by_model_2024(ifc_version, ifc_settings)

Function returning an IFC export configuration for Revit 2024 using the open source third party IFC exporter plug in supported by AutoDesk

This configuration allows export the entire model. If ifc_version is None, IFCVersion.Default will be used.

Parameters:

ifc_version (Autodesk.Revit.DB.IFCVersion) – The ifc version used for the export.

Returns:

An IFCExportConfig object.

Return type:

BIM.IFC.Export.UI.IFCExportConfiguration

duHast.Revit.Exports.Utility.ifc_export_coordinates module

IFC export Coordinate system settings class.

class duHast.Revit.Exports.Utility.ifc_export_coordinates.IFCCoords

Bases: Base

Using enum class for IFC coordinates options.

Class constructor

shared_coordinates = '0'
site_survey_point = '1'
project_base_point = '2'
internal_coordinates = '3'
project_internal = ('4',)
internal_internal = '5'

duHast.Revit.Exports.Utility.ifc_export_settings module

IFC export settings class.

class duHast.Revit.Exports.Utility.ifc_export_settings.IFCSettings(name, ifc_version, space_boundaries, active_phase_id, active_view_id, export_base_quantities, split_walls_and_columns, visible_elements_of_current_view, use2_d_room_boundary_for_volume, use_family_and_type_name_for_reference, export_internal_revit_property_sets, export_ifc_common_property_sets, export_2d_elements, export_parts_as_building_elements, export_bounding_box, export_solid_model_rep, export_schedules_as_psets, export_user_defined_psets, export_user_defined_psets_file_name, export_linked_files, include_site_elevation, use_active_view_geometry, export_specific_schedules, tessellation_level_of_detail, store_ifc_guid, export_rooms_in_view, use_only_triangulation, include_steel_elements, cobie_company_info, cobie_project_info, use_type_name_only_for_ifc_type, use_visible_revit_name_as_entity_name, site_placement, selected_site, geo_ref_crs_name, geo_ref_crs_desc, geo_ref_epsg_code, geo_ref_geodetic_datum, geo_ref_map_unit, exclude_filter)

Bases: Base

_summary_

Parameters:
  • name – The name of the configuration.

  • ifcVersion – The IFCFileFormat of the configuration.

  • spaceBoundaries – The level of space boundaries of the configuration.

  • activePhaseId – The phase of the document to export.

  • exportBaseQuantities – Whether or not to include base quantities for model elements in the export data. Base quantities are generated from model geometry to reflect actual physical quantity values, independent of measurement rules or methods.

  • splitWallsAndColumns – Whether or not to split walls and columns by building stories.

  • visibleElementsOfCurrentView – True to export only the visible elements of the current view (based on filtering and/or element and category hiding). False to export the entire model.

  • use2DRoomBoundaryForVolume – True to use a simplified approach to calculation of room volumes (based on extrusion of 2D room boundaries) which is also the default when exporting to IFC 2x2. False to use the Revit calculated room geometry to represent the room volumes (which is the default when exporting to IFC 2x3).

  • useFamilyAndTypeNameForReference – True to use the family and type name for references. False to use the type name only.

  • exportInternalRevitPropertySets – True to include the Revit-specific property sets based on parameter groups. False to exclude them.

  • exportIFCCommonPropertySets – True to include the IFC common property sets. False to exclude them.

  • export2DElements – True to include 2D elements supported by IFC export (notes and filled regions). False to exclude them.

  • exportPartsAsBuildingElements – True to export the parts as independent building elements. False to export the parts with host element.

  • exportBoundingBox – True to export bounding box. False to exclude them.

  • exportSolidModelRep – True to allow exports of solid models when possible. False to exclude them.

  • exportSchedulesAsPsets – True to allow exports of schedules as custom property sets. False to exclude them.

  • exportUserDefinedPsets – True to allow user defined property sets to be exported. False to ignore them

  • exportUserDefinedPsetsFileName – The name of the file containing the user defined Parameter Mapping Table to be exported.

  • exportLinkedFiles – True to include links in export, otherwise False.

  • includeSiteElevation – True to include IFCSITE elevation in the site local placement origin.

  • useActiveViewGeometry – True to use the active view when generating geometry. False to use default export options.

  • exportSpecificSchedules – True to export specific schedules

  • tessellationLevelOfDetail – Value indicating the level of detail to be used by tessellation. Valid values is between 0 to 1

  • storeIFCGUID – True to store the IFC GUID in the file after the export. This will require manually saving the file to keep the parameter.

  • exportRoomsInView – True to export rooms if their bounding box intersect with the section box. If the section box isn’t visible, then all the rooms are exported if this option is set.

  • useOnlyTriangulation – Value indicating whether tessellated geometry should be kept only as triangulation. (Note: in IFC4_ADD2 IfcPolygonalFaceSet is introduced that can simplify the coplanar triangle faces into a polygonal face. This option skip this)

  • includeSteelElements – Value indicating whether steel elements should be exported.

  • cOBieCompanyInfo – COBie specific company information (from a dedicated tab)

  • cOBieProjectInfo – COBie specific project information (from a dedicated tab)

  • activeViewId (int) – Id of the active view.

  • useTypeNameOnlyForIfcType (bool) – Value indicating whether only the Type name will be used to name the IfcTypeObject

  • useVisibleRevitNameAsEntityName (bool) – Value indicating whether the IFC Entity Name will use visible Revit Name

  • selectedSite (str) – Selected Site name

  • sitePlacement (str: SiteTransformBasis.Shared, SiteTransformBasis.Site, SiteTransformBasis.Project, SiteTransformBasis.Internal, SiteTransformBasis.ProjectInTN, SiteTransformBasis.InternalInTN) – The origin of the exported file: either shared coordinates (Site Survey Point), Project Base Point, or internal coordinates.

  • geoRefCRSName (str) – Projected Coordinate System Name

  • geoRefCRSDesc (str) – Projected Coordinate System Description

  • geoRefEPSGCode (str) – EPSG Code for the Projected CRS

  • geoRefGeodeticDatum (str) – The geodetic datum of the ProjectedCRS

  • geoRefMapUnit (str) – The Map Unit of the ProjectedCRS

  • excludeFilter (str) – Exclude filter string (element list in an array, separated with semicolon ‘;’)

Raises:

Exception – _description_

supported_ifc_versions = {'Default': 'The Autodesk Revit applications default export format. Note that this may change as the defaults change in the Revit user interface.', 'IFC2x2': 'IFC 2x2 file format.', 'IFC2x3': 'IFC 2x3 file format.', 'IFC2x3BFM': 'IFC2x3 Basic FM Handover View', 'IFC2x3CV2': 'IFC 2x3 Coordination View 2.0 file format. This is a variant of IFC 2x3 used for exporting files using the Coordination View 2.0 model view.', 'IFC2x3FM': 'IFC2x3 Extended FM Handover View', 'IFC4': 'IFC 4 file format.', 'IFC4DTV': 'IFC4 Design Transfer View', 'IFC4RV': 'IFC4 Reference View', 'IFCBCA': 'IFC BCA file format. This is a certified variant of IFC 2x2 used for submitting files to the Singapore BCA ePlan Check Server.', 'IFCCOBIE': 'IFC GSA COBIE 2010 file format. This is a variant of IFC 2x3 used for submitting files that are COBIE 2010-complaint.'}
site_placement_options = {'SiteTransformBasis.Internal': 'internal', 'SiteTransformBasis.InternalInTN': 'internalInTN', 'SiteTransformBasis.Project': 'project', 'SiteTransformBasis.ProjectInTN': 'projectInTN', 'SiteTransformBasis.Shared': 'shared', 'SiteTransformBasis.Site': 'site'}

duHast.Revit.Exports.Utility.ifc_export_space_boundaries module

IFC export space boundaries settings class.

class duHast.Revit.Exports.Utility.ifc_export_space_boundaries.IFCSpaceBoundaries

Bases: Base

Using enum class for IFC space boundary options.

Class constructor

no_boundaries = 0
first_level = 1
second_level = 2

Module contents