Sample Code Revit Batch Processor 1.1.16 documentation
Returns all boundary loops for a rooms. Default value set to the center boundary location.
Note: Revit will return multiple BoundarySegments if the wall, which bounding a room, has another wall joining it on the opposing site of the room.
revit_room (Autodesk.Revit.DB.Architecture.Room) – The room.
List of boundary loops defining the room.
List of lists of Autodesk.Revit.DB.BoundarySegment
Returns a list of lists of points representing the room boundary loops.
List of Lists because a room can be made up of multiple loops (holes in rooms!)
First nested list represents the outer boundary of a room
All loops are implicitly closed ( last point is not the first point again!)
boundary_loops (List of lists of Autodesk.Revit.DB.BoundarySegment) – List of boundary loops defining the room.
A data geometry instance containing the points defining the boundary loop.
DataPolygon
Returns a list of dataGeometry object containing points representing the flattened(2D geometry) of a room in the model. List should only have one entry.
revit_room (Autodesk.Revit.DB.Architecture.Room) – The room.
A list of data geometry instance containing the points defining the boundary loop.
list of DataGeometry
Returns a list of dataGeometry object containing points representing the flattened(2D geometry) of all the rooms in the model.
doc (Autodesk.Revit.DB.Document) – Current Revit model document.
A list of data geometry instances containing the points defining the boundary loop per room.
list of DataGeometry
Takes a boundary loop and checks whether consecutive segments host have the same id ( same wall or room separation line. ) If that is the case it will attempt to splice these segments and return them as one curve within the CurveLoop.
boundary_loop (List of Autodesk.Revit.DB.BoundarySegment) – List of boundary segments defining the room.
Result class instance.
conversion status (bool) returned in result.status. False if an exception occurred, otherwise True.
Result.message contain logs of segment conversion step by step.
Result.result will contain the created CurveLoop instance.
On exception:
.status (bool) will be False.
.message will contain the exception message.
Get a rooms boundary segments with the default spatial element boundary options. :param room: The room to get for :type room: Room :return: The boundary segments of the room :rtype: List[List[BoundarySegment]]
Get the element that the room boundary segment belongs to :param rvt_doc: The Revit document :type rvt_doc: Document :param seg: The boundary segment :type seg: BoundarySegment
Get a list of curves as a CurveLoop object. :param rm_crvs: The curves to get for :type rm_crvs: List[Curve] :return: The curves as a CurveLoop object :rtype: CurveLoop
Checks if there is a Wall, ModelLine or both filter and returns a list of the types to filter for. :param filter_only: The host type to filter for :type filter_only: Wall, ModelLine or both in a list :return: A list of types to filter for :rtype: List[Type] or None
Get a list of curves that represents the boundary segments of a room.
Optional parameter to filter the segments by the host type (wall or room separation line). :param rvt_doc: The Revit document :type rvt_doc: Document :param segments: The boundary segments of a room :type segments: List[List[BoundarySegment]] :param filter_only: Optional: The host type to filter for :type filter_only: Wall, ModelLine or both in a list :return: A list of curves :rtype: List[Curve]
Gets the host element of a boundary segment. With option to filter by the host type :param rvt_doc: The Revit document :type rvt_doc: Document :param segments: The boundary segments of a room :type segments: List[List[BoundarySegment]] :param filter_only: Optional: The host type to filter for :type filter_only: Wall, ModelLine or both in a list :return: A list of hosts :rtype: List[Element]
Get the curves that make up the boundary segments of a room. :param rvt_doc: The Revit document :type rvt_doc: Document :param segments: The boundary segments of a room :type segments: List[List[BoundarySegment]] :param filter_only: Optional: The host type to filter for :type filter_only: Wall, ModelLine or both in a list :return: A list of curves :rtype: List[Curve]
Get the wall segments of a room as curves. :param rvt_doc: The Revit document :type rvt_doc: Document :param segments: The boundary segments of a room :type segments: List[List[BoundarySegment]] :return: A list of curves :rtype: List[Curve]
Get the room separation line segments of a room as curves. :param rvt_doc: The Revit document :type rvt_doc: Document :param segments: The boundary segments of a room :type segments: List[List[BoundarySegment]] :return: A list of curves :rtype: List[Curve]
Get the wall segments of a room as walls. :param rvt_doc: The Revit document :type rvt_doc: Document :param segments: The boundary segments of a room :type segments: List[List[BoundarySegment]] :return: A list of walls :rtype: List[Wall]
Get the room separation line segments of a room as model lines. :param rvt_doc: The Revit document :type rvt_doc: Document :param segments: The boundary segments of a room :type segments: List[List[BoundarySegment]] :return: A list of model lines :rtype: List[ModelLine]
Get the centroid of the room boundary segments :param rvt_doc: The Revit document :type rvt_doc: Document :param segments: The boundary segments of a room :type segments: List[List[BoundarySegment]] :return: The centroid of the room boundary segments :rtype: XYZ