RVTDocs.com

EndTreatmentType.Create(Document, String)

Method
Description:
Creates a new EndTreatmentType in a document and adds the input string to the endTreatment parameter.
Syntax
public static EndTreatmentType Create(
	Document doc,
	string strTreatment
)
Examples
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);
}
Parameters
Parameter Type Description
doc Document
strTreatment String
Return Value
Exceptions
Exception Condition
ArgumentNullException A non-optional argument was null