Sample Code Revit Batch Processor 1.1.11 documentation
get_room_segments()
get_segment_host()
get_curves_as_curve_loop()
get_spatial_element_filter()
get_all_segs_from_list()
get_segment_hosts()
get_segments_as_curves()
get_only_wall_segments_as_curves()
get_only_rm_sep_lines_as_curves()
get_only_wall_segments_as_walls()
get_only_rm_sep_lines_as_model_lines()
Get the room number of the room :param room: The room to get the number of :type room: Room :return: The room number of the room :rtype: str
Get the room name of the room :param room: The room to get the name of :type room: Room :return: The room name of the room :rtype: str
Get the phase of the room :param rvt_doc: The document to get the room from :type rvt_doc: Document :param room: The room to get the phase of :type room: Room :return: The phase of the room :rtype: str
Get the revit phase object of the room :param rvt_doc: The document to get the room from :type rvt_doc: Document :param room: The room to get the phase of :type room: Room :return: The phase of the room :rtype: str
Get the phase of the room :param rvt_doc: The document to get the room from :type rvt_doc: Document :param room: The room to get the phase of :type room: Room :return: The phase of the room :rtype: str
Get a list of variations of room number e.g. 1.01, 101, 1-01 :param room: The room to get the number of :type room: Room :return: The list of variations of room number :rtype: list
Get a combination of room number and name in the format: ‘101 - Room Name’ :param room: The room to get the number and name of :type room: Room :return: The combination of room number and name :rtype: str
Get all rooms in the view. This avoids using the FilteredElementCollector overload that takes a view id as an argument as this is has to generate graphics for all elements in the view which is very slow. :param document: The document to get the rooms from :type document: Document :param targ_view: The view to get the rooms from :type targ_view: View :return: The rooms in the view :rtype: list
Get the room associated with the element. This should be updated by Revit as the element moves :param phase_dictionary: The dictionary of phases names to phase elements :type phase_dictionary: dict :param elem: The element to get the room of :type elem: Element :return: The room associated with the element :rtype: Room
Check if the element is in the room :param phase_dictionary: The dictionary of phases names to phase elements :type phase_dictionary: dict :param el: The element to check :type el: Element :param room_to_check: The room to check if the element is in :type room_to_check: Room :return: True if the element is in the room, False otherwise :rtype: bool
Get the first Room from a selection of element ids :param rvt_doc: The document to get the room from :type rvt_doc: Document :param id_list: The list of element ids to check :type id_list: list :return: The room from the selection :rtype: Room
Check if the room is on the same level as the view :param rvt_doc: The document to get the room from :type rvt_doc: Document :param room: The room to check :type room: Room :param view: The view to check :type view: View :return: True if the room is on the same level as the view, False otherwise :rtype: bool
Check if all the points from the room boundary segments are within a view crop box for a list of rooms :param rvt_doc: The document to get the room from :type rvt_doc: Document :param room_list: The list of rooms to check :type room_list: list :param target_view: The view to check :type target_view: View :param target_view_crop_bx_pts: The points of the view crop box curves :type target_view_crop_bx_pts: list :return: The rooms that are entirely within the view crop box :rtype: list
Check if the location crosshairs of a room is within a view crop box for a list of rooms :param room_list: The list of rooms to check :type room_list: list :param target_view_crop_bx_pts: The points of the view crop box curves :type target_view_crop_bx_pts: list :return: The rooms that have their location point within the view crop box :rtype: list
Get only the rooms that are entirely within the view crop box :param rvt_doc: The document to get the room from :type rvt_doc: Document :param rm_list: The list of rooms to check :type rm_list: list :param view: The view to check :type view: View :param check_rm_edges: True: Check if the entire room boundary segments are in the view crop box False: Check if the location crosshair is in the view crop box :type check_rm_edges: bool :return: The rooms that are entirely within the view crop box :rtype: list
Get all rooms in the plan views :param rvt_doc: The document to get the room from :type rvt_doc: Document :param view_list: The list of views to check :type view_list: list :return: The rooms in the plan views :rtype: list
Get all rooms from the sheet object list :param rvt_doc: The document to get the room from :type rvt_doc: Document :param sheet_obj_list: The list of ViewSheetBaseObject objects to check :type sheet_obj_list: list :return: The rooms from the sheet object list :rtype: list
Get all room separation lines in the document.
doc (Document) – The Revit document.
A collector containing room separation lines.
FilteredElementCollector
Returns the room separation line ids which have warnings associated with them.
doc (Autodesk.Revit.DB.Document) – Current Revit model document.
List of element ids
[Autodesk.Revit.DB.ElementId]
returns the ids of all room separation lines in the model without any wanring associated with them.
doc (Autodesk.Revit.DB.Document) – Current Revit model document.
List of element ids
[Autodesk.Revit.DB.ElementId]
Get all room separation lines in the document on a specific level by name.
doc (Document) – The Revit document.
level_name (str) – The name of the level.
A list of room separation lines on the specified level.
list
Get all room separation lines in the document sorted by level name.
doc (Document) – The Revit document.
A dictionary containing room separation lines sorted by level name.
dict
Sorts the room separation lines by phase created id
room_separation_lines – list of room separation lines
:type room_separation_lines:list
A dictionary of room separation lines, where key is the phase created id, and values are the associated room separation lines
{ElementId:[ModelLine]}
Filter room separation lines by phase created.
doc (Document) – The Revit document.
phase_created_name (str) – The phase name of the phase the room separation lines was created in.
A list of room separation lines filtered by phase created.
list
Filter room separation lines by phase demolished.
doc (Document) – The Revit document.
phase_demolished_name (str) – The phase name of the phase the room separation lines was demolished in.
A list of room separation lines filtered by phase demoplished.
list
Filter room separation lines by phase created. Phase created value must be a phase equal to or older than the upper bound phase id. If upper bound phase Id is and ElementId.InvalidElementId the list will be returned unchanged.
doc (Document) – The Revit document.
room_separation_lines ([]) – A list of room separation lines
upper_bound_phase_id (Autodesk.Revit.ElementId) – the id of the phase to be used as upper bound
A list of room separation lines filtered by phase created.
list
Filter room separation lines by level id its placed on.
room_separation_lines ([]) – A list of room separation lines
level_id (Autodesk.Revit.ElementId) – The id of he level to be filtered by.
A list of room separation lines filtered by level placed on.
list
Gets a list of rooms from the model using built in category.
Note: This appears to be slightly faster than using a RoomFilter.
doc (Autodesk.Revit.DB.Document) – Current Revit model document.
All the rooms in the model as a list.
List Autodesk.Revit.DB.Architecture.Room
Gets a list of rooms from the model using built in category.
Note: This appears to be slightly faster than using a RoomFilter.
doc (Autodesk.Revit.DB.Document) – Current Revit model document.
All the rooms in the model as a list.
List Autodesk.Revit.DB.Architecture.Room
Gets a list of unplaced rooms from the model.
doc (Autodesk.Revit.DB.Document) – Current Revit model document.
All the unplaced rooms in the model as a list.
List Autodesk.Revit.DB.Architecture.Room
Gets a list of not enclosed rooms from the model.
doc (Autodesk.Revit.DB.Document) – Current Revit model document.
All the unenclosed rooms in the model as a list.
List Autodesk.Revit.DB.Architecture.Room
Gets a list of redundant rooms from the model.
doc (Autodesk.Revit.DB.Document) – Current Revit model document.
All the redundant rooms in the model as a list.
List Autodesk.Revit.DB.Architecture.Room
Gets a list of all placed rooms from the model.
Placed criteria is Location is not null and Area > 0.0m2
doc (Autodesk.Revit.DB.Document) – Revit model document to search.
All the placed rooms in the model as a list.
List Autodesk.Revit.DB.Architecture.Room