Document
The Document Creation object is used to create new instances of elements within the Autodesk Revit project.
Inheritance Hierarchy
System.Object
Autodesk.Revit.DB.APIObject
Autodesk.Revit.Creation.ItemFactoryBase
Autodesk.Revit.Creation.Document
Namespace: Autodesk.Revit.Creation
Assembly: RevitAPI (in RevitAPI.dll) Version: 25.0.0.0 (25.0.0.0)
Syntax
public class Document : ItemFactoryBase
The Document 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.
(Inherited from ItemFactoryBase)
Public Method
NewArea
Creates a new area
Public Method
Code Example
NewAreaBoundaryConditions(Element, TranslationRotationValue, Double, TranslationRotationValue, Double, TranslationRotationValue, Double)
Creates a new Area BoundaryConditions element on a host element.
Public Method
Code Example
NewAreaBoundaryConditions(Reference, TranslationRotationValue, Double, TranslationRotationValue, Double, TranslationRotationValue, Double)
Creates a new Area BoundaryConditions element on a reference.
Public Method
NewAreaBoundaryLine
Creates a new boundary line as an Area border.
Public Method
NewAreas
Creates new areas
Public Method
NewAreaTag
Creates a new area tag.
Public Method
NewCrossFitting
Add a new family instance of a cross fitting into the Autodesk Revit document, using four connectors.
Public Method
NewCurtainSystem
Creates a new CurtainSystem element from a set of faces.
Public Method
NewCurtainSystem2
Creates a new CurtainSystem element from a set of face references.
Public Method
NewDetailCurve
Creates a new detail curve element.
(Inherited from ItemFactoryBase)
Public Method
NewDetailCurveArray
Creates an array of new detail curve elements.
(Inherited from ItemFactoryBase)
Public Method
Code Example
NewDimension(View, Line, ReferenceArray)
Creates a new linear dimension object using the default dimension style.
(Inherited from ItemFactoryBase)
Public Method
NewDimension(View, Line, ReferenceArray, DimensionType)
Creates a new linear dimension object using the specified dimension style.
(Inherited from ItemFactoryBase)
Public Method
NewElbowFitting
Add a new family instance of an elbow fitting into the Autodesk Revit document, using two connectors.
Public Method
NewExtrusionRoof
Creates a new Extrusion Roof.
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.
(Inherited from ItemFactoryBase)
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.
(Inherited from ItemFactoryBase)
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.
(Inherited from ItemFactoryBase)
Public Method
NewFamilyInstance(XYZ, FamilySymbol, StructuralType)
Inserts a new instance of a family into the document, using a location and a type/symbol.
(Inherited from ItemFactoryBase)
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.
(Inherited from ItemFactoryBase)
Public Method
Code Example
NewFamilyInstance(Curve, FamilySymbol, Level, StructuralType)
Inserts a new instance of a family into the document, using a curve, type/symbol and reference level.
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.
(Inherited from ItemFactoryBase)
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.
(Inherited from ItemFactoryBase)
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.
(Inherited from ItemFactoryBase)
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.
(Inherited from ItemFactoryBase)
Public Method
Code Example
NewFamilyInstance(XYZ, FamilySymbol, Element, Level, StructuralType)
Inserts a new instance of a family into the document, using a location, type/symbol, the host element and a base 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.
(Inherited from ItemFactoryBase)
Public Method
Code Example
NewFamilyInstances2
Creates Family instances within the document.
(Inherited from ItemFactoryBase)
Public Method
NewFascia(FasciaType, Reference)
Creates a fascia along a reference.
Public Method
NewFascia(FasciaType, ReferenceArray)
Creates a fascia along a reference array.
Public Method
NewFlexDuct(IList.XYZ., FlexDuctType)
Adds a new flexible duct into the document, using a point array and duct type.
Public Method
NewFlexDuct(Connector, Connector, FlexDuctType)
Adds a new flexible duct into the document, using two connector, and duct type.
Public Method
NewFlexDuct(Connector, IList.XYZ., FlexDuctType)
Adds a new flexible duct into the document, using a connector, point array and duct type.
Public Method
NewFlexPipe(IList.XYZ., FlexPipeType)
Adds a new flexible pipe into the document, using a point array and pipe type.
Public Method
NewFlexPipe(Connector, Connector, FlexPipeType)
Adds a new flexible pipe into the document, using two connector, and flexible pipe type.
Public Method
NewFlexPipe(Connector, IList.XYZ., FlexPipeType)
Adds a new flexible pipe into the document, using a connector, point array and pipe type.
Public Method
Code Example
NewFootPrintRoof
Creates a new FootPrintRoof element.
Public Method
Code Example
NewGroup
Creates a new type of group.
(Inherited from ItemFactoryBase)
Public Method
NewGutter(GutterType, Reference)
Creates a gutter along a reference.
Public Method
NewGutter(GutterType, ReferenceArray)
Creates a gutter along a reference array.
Public Method
Code Example
NewLineBoundaryConditions(Element, TranslationRotationValue, Double, TranslationRotationValue, Double, TranslationRotationValue, Double, TranslationRotationValue, Double)
Creates a new Line BoundaryConditions element on a host element.
Public Method
Code Example
NewLineBoundaryConditions(Reference, TranslationRotationValue, Double, TranslationRotationValue, Double, TranslationRotationValue, Double, TranslationRotationValue, Double)
Creates a new Line BoundaryConditions element on a reference.
Public Method
Code Example
NewMechanicalSystem
Creates a new MEP mechanical system element.
Public Method
Code Example
NewModelCurve
Creates a new model line element.
(Inherited from ItemFactoryBase)
Public Method
NewModelCurveArray
Creates an array of new model line elements.
(Inherited from ItemFactoryBase)
Public Method
NewOpening(Element, CurveArray, eRefFace)
Creates a new opening in a beam, brace and column.
Public Method
NewOpening(Element, CurveArray, Boolean)
Creates a new opening in a roof, floor and ceiling.
Public Method
NewOpening(Level, Level, CurveArray)
Creates a new shaft opening between a set of levels.
Public Method
NewOpening(Wall, XYZ, XYZ)
Creates a rectangular opening on a wall.
Public Method
NewPipingSystem
Creates a new MEP piping system element.
Public Method
Code Example
NewPointBoundaryConditions
Creates a new Point BoundaryConditions Element.
Public Method
Code Example
NewReferencePlane
Creates a new instance of ReferencePlane.
(Inherited from ItemFactoryBase)
Public Method
Code Example
NewReferencePlane2
Creates a new instance of ReferencePlane.
(Inherited from ItemFactoryBase)
Public Method
NewRoom(Phase)
Creates a new unplaced room and with an assigned phase.
Public Method
Code Example
NewRoom(Level, UV)
Creates a new room on a level at a specified point.
Public Method
Code Example
NewRoom(Room, PlanCircuit)
Creates a new room within the confines of a plan circuit, or places an unplaced room within the confines of the plan circuit.
Public Method
NewRoomBoundaryLines
Creates a new boundary line as an Room border.
Public Method
NewRooms2(Level)
Creates new rooms in each plan circuit found in the given level in the last phase.
Public Method
NewRooms2(Level, Phase)
Creates new rooms in each plan circuit found in the given level in the given phase.
Public Method
NewRooms2(Phase, Int32)
Creates new unplaced rooms in the given phase.
Public Method
Code Example
NewRoomTag
Creates a new RoomTag referencing a room in the host model or in a Revit link.
Public Method
NewSlabEdge(SlabEdgeType, Reference)
Creates a slab edge along a reference.
Public Method
NewSlabEdge(SlabEdgeType, ReferenceArray)
Creates a slab edge along a reference array.
Public Method
NewSpace(Phase)
Creates a new unplaced space on a given phase.
Public Method
NewSpace(Level, UV)
Creates a new space element on the given level at the given location.
Public Method
NewSpace(Level, Phase, UV)
Creates a new space element on the given level, at the given location, and assigned to the given phase.
Public Method
NewSpaceBoundaryLines
Creates a new boundary line as an Space border.
Public Method
NewSpaces2(Phase, Int32)
Creates a set of new unplaced spaces on a given phase.
Public Method
NewSpaces2(Level, Phase, View)
Creates new spaces on the available plan circuits of a the given level.
Public Method
NewSpaceTag
Creates a new SpaceTag.
Public Method
NewSpotCoordinate
Generate a new spot coordinate object within the project.
Public Method
NewSpotElevation
Generate a new spot elevation object within the project.
Public Method
NewTakeoffFitting
Add a new family instance of an takeoff fitting into the Autodesk Revit document, using one connector and one MEP curve.
Public Method
NewTeeFitting
Add a new family instance of a tee fitting into the Autodesk Revit document, using three connectors.
Public Method
NewTransitionFitting
Add a new family instance of an transition fitting into the Autodesk Revit document, using two connectors.
Public Method
NewUnionFitting
Add a new family instance of an union fitting into the Autodesk Revit document, using two connectors.
Public Method
NewZone
Creates a new Zone element.
Public Method
PlaceGroup
Place an instance of a Model Group into the Autodesk Revit document, using a location and a group type.
(Inherited from ItemFactoryBase)
Public Method
ToString
Returns a string that represents the current object.
(Inherited from Object)
Remarks
The Document Creation object is a utility object that is used to create new instances of elements within the Autodesk Revit project. This object, available from the Document.Create property should be used to create elements instead of using New. This object ensures that the elements created are added to the document correctly.