ItemFactoryBase
The ItemFactoryBase object is used to create new instances of elements within the Autodesk Revit document.
Inheritance Hierarchy
System.Object
Autodesk.Revit.DB.APIObject
Autodesk.Revit.Creation.ItemFactoryBase
Autodesk.Revit.Creation.Document
Autodesk.Revit.Creation.FamilyItemFactory
Namespace: Autodesk.Revit.Creation
Assembly: RevitAPI (in RevitAPI.dll) Version: 25.0.0.0 (25.0.0.0)
Syntax
public class ItemFactoryBase : APIObject
The ItemFactoryBase type exposes the following members.
Properties
Name
Description
Public Property
Code Example
IsReadOnly
Identifies if the object is read-only or modifiable.
(Inherited from APIObject)
Methods
Name
Description
Public Method
Dispose
Causes the object to release immediately any resources it may be utilizing.
(Inherited from APIObject)
Public Method
Equals
Determines whether the specified object is equal to the current object.
(Inherited from Object)
Public Method
GetHashCode
Serves as the default hash function.
(Inherited from Object)
Public Method
GetType
Gets the Type of the current instance.
(Inherited from Object)
Public Method
NewAlignment
Add a new locked alignment into the Autodesk Revit document.
Public Method
NewDetailCurve
Creates a new detail curve element.
Public Method
NewDetailCurveArray
Creates an array of new detail curve elements.
Public Method
Code Example
NewDimension(View, Line, ReferenceArray)
Creates a new linear dimension object using the default dimension style.
Public Method
NewDimension(View, Line, ReferenceArray, DimensionType)
Creates a new linear dimension object using the specified dimension style.
Public Method
Code Example
NewFamilyInstance(Face, Line, FamilySymbol)
Inserts a new instance of a family onto a face of an existing element, using a line on that face for its position, and a type/symbol.
Public Method
Code Example
NewFamilyInstance(Line, FamilySymbol, View)
Add a line based detail family instance into the Autodesk Revit document, using an line and a view where the instance should be placed.
Public Method
Code Example
NewFamilyInstance(Reference, Line, FamilySymbol)
Inserts a new instance of a family onto a face referenced by the input Reference instance, using a line on that face for its position, and a type/symbol.
Public Method
NewFamilyInstance(XYZ, FamilySymbol, StructuralType)
Inserts a new instance of a family into the document, using a location and a type/symbol.
Public Method
NewFamilyInstance(XYZ, FamilySymbol, View)
Add a new family instance into the Autodesk Revit document, using an origin and a view where the instance should be placed.
Public Method
Code Example
NewFamilyInstance(Face, XYZ, XYZ, FamilySymbol)
Inserts a new instance of a family onto a face of an existing element, using a location, reference direction, and a type/symbol.
Public Method
Code Example
NewFamilyInstance(Reference, XYZ, XYZ, FamilySymbol)
Inserts a new instance of a family onto a face referenced by the input Reference instance, using a location, reference direction, and a type/symbol.
Public Method
Code Example
NewFamilyInstance(XYZ, FamilySymbol, Element, StructuralType)
Inserts a new instance of a family into the document, using a location, type/symbol, and the host element.
Public Method
NewFamilyInstance(XYZ, FamilySymbol, Level, StructuralType)
Inserts a new instance of a family into the document, using a location, type/symbol, and the level.
Public Method
Code Example
NewFamilyInstance(XYZ, FamilySymbol, XYZ, Element, StructuralType)
Inserts a new instance of a family into the document, using a location, type/symbol, the host element and a reference direction.
Public Method
Code Example
NewFamilyInstances2
Creates Family instances within the document.
Public Method
Code Example
NewGroup
Creates a new type of group.
Public Method
Code Example
NewModelCurve
Creates a new model line element.
Public Method
NewModelCurveArray
Creates an array of new model line elements.
Public Method
Code Example
NewReferencePlane
Creates a new instance of ReferencePlane.
Public Method
Code Example
NewReferencePlane2
Creates a new instance of ReferencePlane.
Public Method
PlaceGroup
Place an instance of a Model Group into the Autodesk Revit document, using a location and a group type.
Public Method
ToString
Returns a string that represents the current object.
(Inherited from Object)
Remarks
The ItemFactoryBase object is a utility object that is used to create new instances of elements within the Autodesk Revit document. This class holds common methods used in both project documents and family documents.