Creates a new instance of a single bent Fabric Sheet element within the project.
Namespace: Autodesk.Revit.DB.Structure
Assembly: RevitAPI (in RevitAPI.dll) Version: 16.0.0.0 (16.0.0.0)
Since: 2016
Syntax
C# |
---|
|
Visual Basic |
---|
|
Visual C++ |
---|
|
Parameters
- document
- Type: Autodesk.Revit.DB Document
The document in which the fabric sheet is to be created.
- concreteHostElementId
- Type: Autodesk.Revit.DB ElementId
The element that will host the FabricSheet. The host can be a Structural Floor, Structural Wall, Structural Slab, Structural Floor Edge, Structural Slab Edge, Structural Column, Beam and Brace. Also, host can be a [!:Autodesk::Revit::DB::Part] created from a structural layer of Structural Floor, Structural Wall or Structural Slab.
- fabricSheetTypeId
- Type: Autodesk.Revit.DB ElementId
The id of the FabricSheetType.
- bendProfile
- Type: Autodesk.Revit.DB CurveLoop
A profile that defines the bending shape of the fabric sheet. The profile can be provided without fillets (eg. for U shape, only three lines not three lines and two arcs), if so, then fillets (two arcs) will be automatically generated basing on the Bend Diameter parameter defined in the Fabric Wire system family. If the provided profile has no corners (has a tangent defined at each point except the ends), no fillets will be generated. The provided profile defines the center-curve of a wire.
Return Value
The instance of the newly created bent fabric sheet.Examples

private FabricSheet CreateBentFabricSheet(Document document, Element wall)
{
RebarHostData rebarHostData = RebarHostData.GetRebarHostData(wall);
if (rebarHostData == null)
return null;
CurveLoop bendingProfile = new CurveLoop();
Line line1 = Line.CreateBound(new XYZ(2, 0.8, 0), new XYZ(6, 0.8, 0));
Line line2 = Line.CreateBound(new XYZ(6, -0.8, 0), new XYZ(4, -2, 0));
Arc arc = Arc.Create(line1.GetEndPoint(1), line2.GetEndPoint(0), new XYZ(7, 0, 0));
bendingProfile.Append(line1);
bendingProfile.Append(arc);
bendingProfile.Append(line2);
ElementId fabricSheetTypeId = document.GetDefaultElementTypeId(ElementTypeGroup.FabricSheetType);
FabricSheet bentFabricSheet = FabricSheet.Create(document, wall.Id, fabricSheetTypeId, bendingProfile);
// Regeneration is required before setting any property to object that was created in the same transaction.
document.Regenerate();
bentFabricSheet.BentFabricBendDirection = BentFabricBendDirection.Major;
AnalyticalModelSurface ams = wall.GetAnalyticalModel() as AnalyticalModelSurface;
bentFabricSheet.PlaceInHost(wall, ams.GetLocalCoordinateSystem());
// Give the user some information
TaskDialog.Show("Revit", string.Format("Bent Fabric Sheet ID='{0}' created successfully.", bentFabricSheet.Id.IntegerValue));
return bentFabricSheet;
}

Private Function CreateBentFabricSheet(document As Document, wall As Element) As FabricSheet
Dim rebarHostData As RebarHostData = rebarHostData.GetRebarHostData(wall)
If rebarHostData Is Nothing Then
Throw New Exception("Create new load combination failed.")
End If
Dim bendingProfile As CurveLoop = New CurveLoop()
Dim line1 As Line = Line.CreateBound(New XYZ(2, 0.8, 0), New XYZ(6, 0.8, 0))
Dim line2 As Line = Line.CreateBound(New XYZ(6, -0.8, 0), New XYZ(4, -2, 0))
Dim arc As Arc = arc.Create(line1.GetEndPoint(1), line2.GetEndPoint(0), New XYZ(7, 0, 0))
bendingProfile.Append(line1)
bendingProfile.Append(arc)
bendingProfile.Append(line2)
Dim fabricSheetTypeId As ElementId = document.GetDefaultElementTypeId(ElementTypeGroup.FabricSheetType)
Dim bentFabricSheet As FabricSheet = FabricSheet.Create(document, wall.Id, fabricSheetTypeId, bendingProfile)
' Regeneration is required before setting any property to object that was created in the same transaction.
document.Regenerate()
bentFabricSheet.BentFabricBendDirection = BentFabricBendDirection.Major
Dim ams As AnalyticalModelSurface = TryCast(wall.GetAnalyticalModel(), AnalyticalModelSurface)
bentFabricSheet.PlaceInHost(wall, ams.GetLocalCoordinateSystem())
' Give the user some information
TaskDialog.Show("Revit", String.Format("Bent Fabric Sheet ID='{0}' created successfully.", bentFabricSheet.Id.IntegerValue))
Return bentFabricSheet
End Function
Exceptions
Exception | Condition |
---|---|
Autodesk.Revit.Exceptions ArgumentException | concreteHostElementId is not a valid ElementId for the host Fabric Sheet. -or- fabricSheetTypeId should refer to an FabricSheetType element. -or- Thrown when bend profile contains an overlap or intersecting segments. -or- Thrown when bend profile is empty. -or- Thrown when bend profile contains an empty loop. -or- Thrown when bend profile contains multiple loops. -or- Thrown when bend profile contains a closed loop. -or- Thrown when bend profile contains arcs that are not distracted by a line. -or- Thrown when bend profile contains too short segments, so fillet can't be added. -or- Thrown when the provided profile cannot be used as a bending shape for this fabric sheet. |
Autodesk.Revit.Exceptions ArgumentNullException | A non-optional argument was NULL |
Autodesk.Revit.Exceptions DisabledDisciplineException | None of the following disciplines is enabled: Structural. |