Sample Code Revit Batch Processor 1.1.11 documentation
Function modifying the past in view name and returns a file name.
view_name (str) – The view name to be used as file name.
view_filter_rule (str) – A prefix which will be removed from the view name.
file_extension (str) – The file extension to be used. Format is ‘.something’
A file name.
str
Converts properties on a Revit element into data_property instances
element (Autodesk.Revit.DB.Element) – A Revit element
A list of data_property instances
Returns a populated data type property instance.
doc (Autodesk.Revit.DB.Document) – The current Revit model document.
element (Autodesk.Revit.DB.Element) – A Revit element
A data type properties instance
Returns a populated data instance property instance.
element (Autodesk.Revit.DB.Element) – A Revit element
A data instance properties instance
Returns a populated data level instance.
doc (Autodesk.Revit.DB.Document) – The current Revit model document.
element (Autodesk.Revit.DB.Element) – A Revit element
built_in_parameter_def (Autodesk.Revit.DB.BuiltInParameter) – The build in parameter containing the offset from level
A data level instance
Returns a populated data design set option instance.
doc (Autodesk.Revit.DB.Document) – The current Revit model document.
element (Autodesk.Revit.DB.Element) – A Revit element
A data design set instance
Returns a data phase instance with names for created and demolished populated.
doc (Autodesk.Revit.DB.Document) – The current Revit model document.
element (Autodesk.Revit.DB.Element) – A Revit element
A data phase instance
Returns a revit_model instance with the name populated. If detached and not saved yet it will be named “Detached Model”
doc (Autodesk.Revit.DB.Document) – The current Revit model document.
A data revit model instance
Returns an IFC export configuration for the built in IFC exporter. :param ifc_version: The ifc version used for the export. :type ifc_version: Autodesk.Revit.DB.IFCVersion :param ifc_space_bounds: IFC space boundary setting, defaults to IFCSpaceBoundaries.noBoundaries :type ifc_space_bounds: SampleCodeBatchProcessor.RevitExport.IFCSpaceBoundaries, optional :return: an IFC export option :rtype: Autodesk.Revit.DB.IFCExportOptions
Exports to IFC either the entire model or a view only using 3rd party exporter. What gets exported is defined in the ifc_export_option.
doc (Autodesk.Revit.DB.Document) – Current Revit model document.
ifc_export_option (Autodesk.Revit.DB IFCExportOptions) – The settings for the IFC export.
directory_path (str) – The directory path to where the export is being saved.
file_name (str) – The file name under which the export is being saved.
Result class instance. - Export status returned in result.status. False if an exception occurred, otherwise True. - result.message will contain the fully qualified file path of the exported file. On exception: - result.status (bool) will be False. - result.message will contain the exception message.
Exports 3D views matching a filter (view starts with) to IFC using the default built-in exporter.
doc (Autodesk.Revit.DB.Document) – Current Revit model document.
view_filter (str) – String the view name is to start with if it is to be exported. (Both view name and string are set to lowercase for comparison)
ifc_export_option (Autodesk.Revit.DB.IFCExportOptions) – The IFC export option.
directory_path (str) – The directory path to where the export is being saved.
Result class instance. - result.status (bool): False if an exception occurred, otherwise True (export status). - result.message (str): Contains the fully qualified file path of the exported file.
result.status (bool): False.
result.message (str): Contains the exception message.
Function assigning a view Id to export ifc config if it is exporting by view. By model export will assign Autodesk.Revit.DB.ElementId.InvalidElementId instead. :param export_config: The ifc export configuration used. :type export_config: BIM.IFC.Export.UI.IFCExportConfiguration :param view_id: The id of the view to be exported, defaults to ElementId.InvalidElementId :type view_id: Autodesk.Revit.DB.ElementId, optional :param coord_option: Describes the coordinate options used for the export, defaults to IFCCoords.SharedCoordinates :type coord_option: SampleCodeBatchProcessor.RevitExport.IFCCoords, optional :return: An updated ifc export option instance. :rtype: Autodesk.Revit.DB.IFCExportOptions
Exports 3D views matching a filter (view starts with) to IFC using a 3rd party exporter.
By default, the file name of the export will be the same as the name of the view being exported.
doc (Autodesk.Revit.DB.Document) – Current Revit model document.
view_filter (str) – String the view name is to start with if it is to be exported. (Both view name and string are set to lowercase for comparison)
ifc_export_config (BIM.IFC.Export.UI.IFCExportConfiguration) – The IFC export configuration.
directory_path (str) – The directory path to where the export is being saved.
ifc_coordinates_system (SampleCodeBatchProcessor.RevitExport.IFCCoords, optional) – Describes the coordinate options used for the export, defaults to IFCCoords.SharedCoordinates.
do_something_with_view_name (function, optional) – A function that takes the view name as an argument and processes it. The modified view name is then used as the actual file name, defaults to None, which uses the view name unchanged as the export file name.
Result class instance. - result.status (bool): False if an exception occurred, otherwise True (export status). - result.message (str): Contains the fully qualified file path of the exported file.
result.status (bool): False.
result.message (str): Contains the exception message.
Function exporting the entire model to IFC using 3rd party exporter.
doc (Autodesk.Revit.DB.Document) – Current Revit model document.
ifc_export_config (BIM.IFC.Export.UI.IFCExportConfiguration) – The IFC export configuration.
directory_path (str) – The directory path to where the export is being saved.
file_name (str) – The file name under which the export is being saved.
coord_option (SampleCodeBatchProcessor.RevitExport.IFCCoords, optional) – Describes the coordinate options used for the export, defaults to IFCCoords.SharedCoordinates
Result class instance. - Export status returned in result.status. False if an exception occurred, otherwise True. - result.message will contain the fully qualified file path of the exported file. On exception: - result.status (bool) will be False. - result.message will contain the exception message.
Returns the 3rd party ifc config for export by model depending on revit version. :param doc: Current Revit model document. :type doc: Autodesk.Revit.DB.Document :param ifc_version: The ifc version used for the export. :type ifc_version: Autodesk.Revit.DB.IFCVersion :raises ValueError: Raises an exception if the revit version in use is not supported by this script. :return: An ifc export config instance based on the Revit version. :rtype: BIM.IFC.Export.UI.IFCExportConfiguration
Returns the 3rd party ifc config for export by view depending on revit version. :param doc: Current Revit model document. :type doc: Autodesk.Revit.DB.Document :param ifc_version: The ifc version used for the export. :type ifc_version: Autodesk.Revit.DB.IFCVersion :raises ValueError: Raises an exception if the revit version in use is not supported by this script. :return: An ifc export config instance based on the Revit version. :rtype: BIM.IFC.Export.UI.IFCExportConfiguration