public FamilyInstance NewFamilyInstance( XYZ location, FamilySymbol symbol, StructuralType structuralType )
| Exception | Condition |
|---|---|
| ArgumentException | Thrown if the symbol is not active. |
| InvalidOperationException | Thrown if the family is level-based, for new instances of such families require a valid level to be supplied at the time of creation. |
The type/symbol that is used must be loaded into the document before this method is called. Families and their symbols can be loaded using the Document.LoadFamily or Document.LoadFamilySymbol methods.
Some Families, such as Beams, have more than one endpoint and are inserted in the same manner as single point instances. Once inserted these linear family instances can have their endpoints changed by using the instance's Element.Location property.
Note: if the created family instance includes nested instances, the API framework will automatically regenerate the document during this method call.