RVTDocs.com
Namespace: Autodesk.Revit.DB Class: Subelement

Subelement.Create

Method
Description:
Creates an object representing element or subelement.
Remarks:
If %reference% points to linked document:
  • The GetReference() method of the newly created subelement will return the local reference in the linked document.
  • The Document property of the newly created subelement will return the linked document.
Syntax
public static Subelement Create(
	Document aDoc,
	Reference reference
)
Parameters
Parameter Type Description
aDoc Document The document.
reference Reference The reference that identifies element or subelement.
Return Value
Type Description
Subelement The newly created subelement.
Exceptions
Exception Condition
ArgumentException reference does not identify a valid element or subelement.
ArgumentNullException A non-optional argument was null