Document Class

The Document Creation object is used to create new instances of elements within the Autodesk Revit project.
Inheritance Hierarchy
SystemObject
  Autodesk.Revit.DBAPIObject
    Autodesk.Revit.CreationItemFactoryBase
      Autodesk.Revit.CreationDocument

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
 NameDescription
Public propertyCode exampleIsReadOnlyIdentifies if the object is read-only or modifiable.
(Inherited from APIObject)
Top
Methods
 NameDescription
Public methodDisposeCauses the object to release immediately any resources it may be utilizing.
(Inherited from APIObject)
Public methodEqualsDetermines whether the specified object is equal to the current object.
(Inherited from Object)
Public methodGetHashCodeServes as the default hash function.
(Inherited from Object)
Public methodGetTypeGets the Type of the current instance.
(Inherited from Object)
Public methodNewAlignmentAdd a new locked alignment into the Autodesk Revit document.
(Inherited from ItemFactoryBase)
Public methodNewAreaCreates a new area
Public methodCode exampleNewAreaBoundaryConditions(Element, TranslationRotationValue, Double, TranslationRotationValue, Double, TranslationRotationValue, Double) Creates a new Area BoundaryConditions element on a host element.
Public methodCode exampleNewAreaBoundaryConditions(Reference, TranslationRotationValue, Double, TranslationRotationValue, Double, TranslationRotationValue, Double) Creates a new Area BoundaryConditions element on a reference.
Public methodNewAreaBoundaryLineCreates a new boundary line as an Area border.
Public methodNewAreasCreates new areas
Public methodNewAreaTagCreates a new area tag.
Public methodNewCrossFittingAdd a new family instance of a cross fitting into the Autodesk Revit document, using four connectors.
Public methodNewCurtainSystemCreates a new CurtainSystem element from a set of faces.
Public methodNewCurtainSystem2Creates a new CurtainSystem element from a set of face references.
Public methodNewDetailCurve Creates a new detail curve element.
(Inherited from ItemFactoryBase)
Public methodNewDetailCurveArray Creates an array of new detail curve elements.
(Inherited from ItemFactoryBase)
Public methodCode exampleNewDimension(View, Line, ReferenceArray) Creates a new linear dimension object using the default dimension style.
(Inherited from ItemFactoryBase)
Public methodNewDimension(View, Line, ReferenceArray, DimensionType) Creates a new linear dimension object using the specified dimension style.
(Inherited from ItemFactoryBase)
Public methodNewElbowFittingAdd a new family instance of an elbow fitting into the Autodesk Revit document, using two connectors.
Public methodNewExtrusionRoofCreates a new Extrusion Roof.
Public methodCode exampleNewFamilyInstance(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 methodCode exampleNewFamilyInstance(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 methodCode exampleNewFamilyInstance(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 methodNewFamilyInstance(XYZ, FamilySymbol, StructuralType)Inserts a new instance of a family into the document, using a location and a type/symbol.
(Inherited from ItemFactoryBase)
Public methodNewFamilyInstance(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 methodCode exampleNewFamilyInstance(Curve, FamilySymbol, Level, StructuralType)Inserts a new instance of a family into the document, using a curve, type/symbol and reference level.
Public methodCode exampleNewFamilyInstance(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 methodCode exampleNewFamilyInstance(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 methodCode exampleNewFamilyInstance(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 methodNewFamilyInstance(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 methodCode exampleNewFamilyInstance(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 methodCode exampleNewFamilyInstance(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 methodCode exampleNewFamilyInstances2 Creates Family instances within the document.
(Inherited from ItemFactoryBase)
Public methodNewFascia(FasciaType, Reference)Creates a fascia along a reference.
Public methodNewFascia(FasciaType, ReferenceArray)Creates a fascia along a reference array.
Public methodNewFlexDuct(IListXYZ, FlexDuctType)Adds a new flexible duct into the document, using a point array and duct type.
Public methodNewFlexDuct(Connector, Connector, FlexDuctType)Adds a new flexible duct into the document, using two connector, and duct type.
Public methodNewFlexDuct(Connector, IListXYZ, FlexDuctType)Adds a new flexible duct into the document, using a connector, point array and duct type.
Public methodNewFlexPipe(IListXYZ, FlexPipeType)Adds a new flexible pipe into the document, using a point array and pipe type.
Public methodNewFlexPipe(Connector, Connector, FlexPipeType)Adds a new flexible pipe into the document, using two connector, and flexible pipe type.
Public methodNewFlexPipe(Connector, IListXYZ, FlexPipeType)Adds a new flexible pipe into the document, using a connector, point array and pipe type.
Public methodCode exampleNewFootPrintRoofCreates a new FootPrintRoof element.
Public methodCode exampleNewGroupCreates a new type of group.
(Inherited from ItemFactoryBase)
Public methodNewGutter(GutterType, Reference)Creates a gutter along a reference.
Public methodNewGutter(GutterType, ReferenceArray)Creates a gutter along a reference array.
Public methodCode exampleNewLineBoundaryConditions(Element, TranslationRotationValue, Double, TranslationRotationValue, Double, TranslationRotationValue, Double, TranslationRotationValue, Double) Creates a new Line BoundaryConditions element on a host element.
Public methodCode exampleNewLineBoundaryConditions(Reference, TranslationRotationValue, Double, TranslationRotationValue, Double, TranslationRotationValue, Double, TranslationRotationValue, Double) Creates a new Line BoundaryConditions element on a reference.
Public methodCode exampleNewMechanicalSystemCreates a new MEP mechanical system element.
Public methodCode exampleNewModelCurve Creates a new model line element.
(Inherited from ItemFactoryBase)
Public methodNewModelCurveArray Creates an array of new model line elements.
(Inherited from ItemFactoryBase)
Public methodNewOpening(Element, CurveArray, eRefFace) Creates a new opening in a beam, brace and column.
Public methodNewOpening(Element, CurveArray, Boolean) Creates a new opening in a roof, floor and ceiling.
Public methodNewOpening(Level, Level, CurveArray) Creates a new shaft opening between a set of levels.
Public methodNewOpening(Wall, XYZ, XYZ) Creates a rectangular opening on a wall.
Public methodNewPipingSystemCreates a new MEP piping system element.
Public methodCode exampleNewPointBoundaryConditions Creates a new Point BoundaryConditions Element.
Public methodCode exampleNewReferencePlane Creates a new instance of ReferencePlane.
(Inherited from ItemFactoryBase)
Public methodCode exampleNewReferencePlane2 Creates a new instance of ReferencePlane.
(Inherited from ItemFactoryBase)
Public methodNewRoom(Phase) Creates a new unplaced room and with an assigned phase.
Public methodCode exampleNewRoom(Level, UV) Creates a new room on a level at a specified point.
Public methodCode exampleNewRoom(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 methodNewRoomBoundaryLinesCreates a new boundary line as an Room border.
Public methodNewRooms2(Level) Creates new rooms in each plan circuit found in the given level in the last phase.
Public methodNewRooms2(Level, Phase) Creates new rooms in each plan circuit found in the given level in the given phase.
Public methodNewRooms2(Phase, Int32) Creates new unplaced rooms in the given phase.
Public methodCode exampleNewRoomTag Creates a new RoomTag referencing a room in the host model or in a Revit link.
Public methodNewSlabEdge(SlabEdgeType, Reference)Creates a slab edge along a reference.
Public methodNewSlabEdge(SlabEdgeType, ReferenceArray)Creates a slab edge along a reference array.
Public methodNewSpace(Phase) Creates a new unplaced space on a given phase.
Public methodNewSpace(Level, UV)Creates a new space element on the given level at the given location.
Public methodNewSpace(Level, Phase, UV)Creates a new space element on the given level, at the given location, and assigned to the given phase.
Public methodNewSpaceBoundaryLinesCreates a new boundary line as an Space border.
Public methodNewSpaces2(Phase, Int32) Creates a set of new unplaced spaces on a given phase.
Public methodNewSpaces2(Level, Phase, View) Creates new spaces on the available plan circuits of a the given level.
Public methodNewSpaceTag Creates a new SpaceTag.
Public methodNewSpotCoordinate Generate a new spot coordinate object within the project.
Public methodNewSpotElevation Generate a new spot elevation object within the project.
Public methodNewTakeoffFittingAdd a new family instance of an takeoff fitting into the Autodesk Revit document, using one connector and one MEP curve.
Public methodNewTeeFittingAdd a new family instance of a tee fitting into the Autodesk Revit document, using three connectors.
Public methodNewTransitionFittingAdd a new family instance of an transition fitting into the Autodesk Revit document, using two connectors.
Public methodNewUnionFittingAdd a new family instance of an union fitting into the Autodesk Revit document, using two connectors.
Public methodNewZoneCreates a new Zone element.
Public methodPlaceGroupPlace an instance of a Model Group into the Autodesk Revit document, using a location and a group type.
(Inherited from ItemFactoryBase)
Public methodToStringReturns a string that represents the current object.
(Inherited from Object)
Top
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.
See Also