Revit 2025 API
End |
Creates a new EndTreatmentType in a document and adds the input string to the endTreatment parameter.
Namespace: Autodesk.Revit.DB.Structure
Assembly: RevitAPI (in RevitAPI.dll) Version: 25.0.0.0 (25.0.0.0)
Syntax
public static EndTreatmentType Create( Document doc, string strTreatment )
Public Shared Function Create ( doc As Document, strTreatment As String ) As EndTreatmentType
public: static EndTreatmentType^ Create( Document^ doc, String^ strTreatment )
static member Create : doc : Document * strTreatment : string -> EndTreatmentType
Parameters
Return Value
EndTreatmentType| Exception | Condition |
|---|---|
| ArgumentNullException | A non-optional argument was null |
private void NewEndTreatmentForCouplerType(Document doc, ElementId couplerTypeId) { EndTreatmentType treatmentType = EndTreatmentType.Create(doc, "Custom"); FamilySymbol couplerType = doc.GetElement(couplerTypeId) as FamilySymbol; Parameter param = couplerType.get_Parameter(BuiltInParameter.COUPLER_MAIN_ENDTREATMENT); param.Set(treatmentType.Id); }
Private Sub NewEndTreatmentForCouplerType(doc As Document, couplerTypeId As ElementId) Dim treatmentType As EndTreatmentType = EndTreatmentType.Create(doc, "Custom") Dim couplerType As FamilySymbol = TryCast(doc.GetElement(couplerTypeId), FamilySymbol) Dim param As Parameter = couplerType.Parameter(BuiltInParameter.COUPLER_MAIN_ENDTREATMENT) param.[Set](treatmentType.Id) End Sub
No code example is currently available or this language may not be supported.
No code example is currently available or this language may not be supported.
See Also