M

EndTreatmentType.Create

Description:
Creates a new EndTreatmentType in the specified document and adds the input string to the endTreatment parameter.
Overloads (2):
Create(Document,String)
public static EndTreatmentType Create(
	Document doc,
	string treatment
)
  • doc
    Returns the newly created EndTreatmentType in the specified document.
  • String
    treatment
    This string will be se to the endTreatment parameter.
Return Value EndTreatmentType Returns the newly created EndTreatmentType in the specified document.
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);
}