FabricSheet.GetSegmentParameterIdsAndLengths
Description:
Returns the array of pairs [parameter ID, length] that correspond to segments of a bent fabric sheet (like A, B, C, D etc.).
Returns the array of pairs [parameter ID, length] that correspond to segments of a bent fabric sheet (like A, B, C, D etc.).
Remarks:
This method does not provide alphabetical nor any other order of returned parameters.
This method does not provide alphabetical nor any other order of returned parameters.
public IDictionary<ElementId, double> GetSegmentParameterIdsAndLengths(
bool rounded
)
-
BooleanroundedSet to true to return rounded values for segments lengths.
Return Value
IDictionary<ElementId,Double>
Array of pairs [parameter ID, length] that correspond to segments of a bent fabric sheet (like A, B, C, D etc.) is returned for bend fabric sheet.
For flat fabric sheet (not bent) empty array is returned.
private void GetBentFabricSheetData(FabricSheet fabricSheet)
{
string fabricNumber = fabricSheet.FabricNumber;
IDictionary<ElementId, double> idsAndLengths = fabricSheet.GetSegmentParameterIdsAndLengths(true);
StringBuilder displayInfo = new StringBuilder();
displayInfo.AppendLine(string.Format("Parameter Ids and segment lengths for FabricSheet {0}:", fabricNumber));
foreach (ElementId key in idsAndLengths.Keys)
{
displayInfo.AppendLine(string.Format("Parameter Id: {0}, Length: {1}", key, idsAndLengths[key]));
}
TaskDialog.Show("Revit", displayInfo.ToString());
}