Document Class


Document Class

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

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 )
Top
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 )
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