CompoundStructureVariableLayerIndex Property |
Indicates the index of the layer which is designated as variable.
Namespace: Autodesk.Revit.DBAssembly: RevitAPI (in RevitAPI.dll) Version: 25.0.0.0 (25.0.0.0)
Syntaxpublic int VariableLayerIndex { get; set; }
Public Property VariableLayerIndex As Integer
Get
Set
public:
property int VariableLayerIndex {
int get ();
void set (int value);
}
member VariableLayerIndex : int with get, set
Property Value
Int32
The index of the layer specified as variable. If there is no variable layer, this value is -1.
ExceptionsException | Condition |
---|
ArgumentException |
When setting this property: The specified layer cannot be set to a variable layer.
|
ArgumentOutOfRangeException |
When setting this property: The layer index is out of range.
-or-
When setting this property: The layer index is invalid.
|
Remarks
If the host object to which it is applied
has an actual width that exceeds the total width of all layers, then all layers except the variable layer
will be created with their specified width, and the variable layer will expand to take up the slack.
Generally this is applicable for floors and roofs with shape edits applied. There can be only one variable layer.
In the wall compound structure UI, when a layer is labeled 'variable' in the thickness column,
that means it is assigned either to a non-rectangular region, or it means the layer is assigned to two different layers.
Neither of those situations is what this method refers to.
See Also