CompoundStructureMergeRegionsAdjacentToSegment Method |
Merges the two regions which share the specified segment.
Namespace: Autodesk.Revit.DBAssembly: RevitAPI (in RevitAPI.dll) Version: 25.0.0.0 (25.0.0.0)
Syntaxpublic int MergeRegionsAdjacentToSegment(
int segmentId,
int layerIdxForMergedRegion
)
Public Function MergeRegionsAdjacentToSegment (
segmentId As Integer,
layerIdxForMergedRegion As Integer
) As Integer
public:
int MergeRegionsAdjacentToSegment(
int segmentId,
int layerIdxForMergedRegion
)
member MergeRegionsAdjacentToSegment :
segmentId : int *
layerIdxForMergedRegion : int -> int
Parameters
- segmentId Int32
-
The id of a segment in the underlying grid.
- layerIdxForMergedRegion Int32
-
The index of the layer to which the resulting region will be associated.
Return Value
Int32
The id of the resulting region. If -1 is returned, then the operation would have produced
an invalid region and was not performed.
ExceptionsException | Condition |
---|
ArgumentOutOfRangeException |
The layer index is out of range.
|
InvalidOperationException |
Split and merge regions operations can be used only for vertically compound structures without variable thickness layers.
-or-
The segment is not shared by adjacent regions.
|
See Also