End
|
Creates a new EndTreatmentType in the specified document and adds the input string to the endTreatment parameter.
Namespace: Autodesk.Revit.DB.Structure
Assembly: RevitAPI (in RevitAPI.dll) Version: 27.0.4.0 (27.0.4.0)
Parameters
- doc Document
- Returns the newly created EndTreatmentType in the specified document.
- treatment String
- This string will be se to the endTreatment parameter.
Return Value
EndTreatmentTypeReturns the newly created EndTreatmentType in the specified document.
| Exception | Condition |
|---|---|
| ArgumentNullException | A non-optional argument was null |
C#
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);
}