<Code Lib>
M

EndTreatmentType.Create(Document, String)

Description:
Creates a new EndTreatmentType in a document and adds the input string to the endTreatment parameter.
Overloads (2):
Create(Document,String)

public static EndTreatmentType Create(
	Document doc,
	string strTreatment
)

  • doc
    Returns the newly created EndTreatmentType in the specified document.
  • strTreatment
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);
}

Loading…