EndTreatmentTypeCreate(Document, String) Method

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
)

Parameters

doc  Document
 
strTreatment  String
 

Return Value

EndTreatmentType
Exceptions
ExceptionCondition
ArgumentNullException A non-optional argument was null
Example
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);
}
See Also