Document Methods


Document Methods

The Document type exposes the following members.

Methods
Name Description
Public method AcquireCoordinates Acquires coordinates from the specified link instance.
Public method AutoJoinElements Forces the elements in the Revit document to automatically join to their neighbors where appropriate.
Public method CanEnableCloudWorksharing Checks if cloud worksharing can be enabled for the cloud model.
Public method CanEnableWorksharing Checks if worksharing can be enabled in the document.
Public method Close Closes the document, save the changes if there are.
Public method Close(Boolean) Closes the document with the option to save.
Public method CombineElements Combine a set of combinable elements into a geometry combination.
Public method ConvertDetailToModelCurves Converts a group of DetailCurves to equivalent ModelCurves.
Public method ConvertModelToDetailCurves Converts a group of ModelCurves to equivalent DetailCurves.
Public method ConvertModelToSymbolicCurves Converts a group of ModelCurves to equivalent SymbolicCurves.
Public method ConvertSymbolicToModelCurves Converts a group of SymbolicCurves to equivalent ModelCurves.
Public method Code example Delete(ElementId) Deletes an element from the document given the id of that element.
Public method Code example Delete(ICollection ElementId ) Deletes a set of elements from the document.
Public method Dispose
Public method Code example EditFamily Gets the document of a loaded family to edit.
Public method EnableCloudWorksharing Enables cloud worksharing for a cloud model
Public method EnableWorksharing Enables worksharing in the document.
Public method Equals Determines whether the specified Object equals to this Object .
(Overrides Object Equals(Object) )
Public method EraseSchemaAndAllEntities Erases Schema and all its Entities from the document.
Public method Export(String, IList ElementId , PDFExportOptions) Exports a selection of views in PDF format.
Public method Export(String, String, GBXMLExportOptions) Export the model in gbXML (green-building) format.
Public method Export(String, String, IFCExportOptions) Exports the document to the Industry Standard Classes (IFC) format.
Public method Export(String, String, NavisworksExportOptions) Exports a Revit project to the Navisworks .nwc format.
Public method Export(String, String, OBJExportOptions) Exports a view specified in the export options to the OBJ format.
Public method Export(String, String, STEPExportOptions) Exports the current view or a selection of views in STEP format.
Public method Export(String, String, STLExportOptions) Exports a view specified in the export options to the STL format.
Public method Code example Export(String, String, ViewSet, DWFExportOptions) Exports the current view or a selection of views in DWF format.
Public method Export(String, String, ViewSet, DWFXExportOptions) Exports the current view or a selection of views in DWFX format.
Public method Export(String, String, ViewSet, FBXExportOptions) Exports the document in 3D-Studio Max (FBX) format.
Public method Code example Export(String, String, ICollection ElementId , DGNExportOptions) Exports a selection of views in DGN format.
Public method Code example Export(String, String, ICollection ElementId , DWGExportOptions) Exports a selection of views in DWG format.
Public method Export(String, String, ICollection ElementId , DXFExportOptions) Exports a selection of views in DXF format.
Public method Export(String, String, ICollection ElementId , SATExportOptions) Exports the current view or a selection of views in SAT format.
Public method ExportImage Exports a view or set of views into an image file.
Public method Code example GetAllUnusedElements Returns the list of element ids that are not used. The list of unused element ids may include elements that can't be deleted.
Public method Code example GetChangedElements Extracts a collection containing the ids of elements that have been created, modified or deleted between the input baseVersion and the document's current version.
Public method GetCloudFolderId Gets ForgeDM folder id where the model locates.
Public method GetCloudModelPath Gets the cloud model path of the cloud model.
Public method GetCloudModelUrn A ForgeDM Urn identifying the model.
Public method Code example GetDefaultElementTypeId Gets the default element type id with the given DefaultElementType id.
Public method Code example GetDefaultFamilyTypeId Gets the default family type id with the given family category id.
Public method GetDocumentPreviewSettings Returns the preview settings for the given document.
Public method Static member GetDocumentVersion Gets the DocumentVersion that corresponds to a document.
Public method GetElement(ElementId) Gets the Element referenced by the input ElementId.
Public method GetElement(Reference) Gets the Element referenced by the input reference.
Public method GetElement(String) Gets the Element referenced by a unique id string.
Public method GetHashCode Gets the hash code of this document instance.
(Overrides Object GetHashCode )
Public method GetHubId Gets ForgeDM hub id where the model locates. It is cached in session.
Public method GetPaintedMaterial Get the material painted on the element's face. Returns invalidElementId if the face is not painted.
Public method GetPrintSettingIds Retrieves all Print Settings of current project.
Public method GetProjectId Gets ForgeDM project id where the model locates.
Public method GetRoomAtPoint(XYZ) Gets a room containing the point.
Public method GetRoomAtPoint(XYZ, Phase) Gets a room containing the point.
Public method GetSpaceAtPoint(XYZ) Gets a space containing the point.
Public method GetSpaceAtPoint(XYZ, Phase) Gets a space containing the point.
Public method GetSubelement(Reference) Gets the subelement referenced by the input reference.
Public method GetSubelement(String) Gets the subelement referenced by a unique id string.
Public method GetSubelement(ElementId, Int32) Gets the subelement referenced by a parent id and subelement id.
Public method GetType Gets the Type of the current instance.
(Inherited from Object )
Public method GetTypeOfStorage Get the storage type of the identified built-in parameter.
Public method GetUnits Gets the Units object.
Public method Code example GetUnusedElements Returns the list of element ids that are not used and can be deleted from the document.
Public method GetWarnings Returns list of failure messages generated from persistent (reviewable) warnings accumulated in the document.
Public method GetWorksetId Get Id of the Workset which owns the element.
Public method GetWorksetTable Get the WorksetTable of this document.
Public method GetWorksharingCentralModelPath Gets the central model path of the worksharing model.
Public method Code example HasAllChangesFromCentral Returns whether the model in the current session is up to date with central.
Public method Import(String, GBXMLImportOptions) Imports a Green-Building XML file into the document.
Public method Import(String, AXMImportOptions, View) Imports an AXM file into the document.
Public method Import(String, ImportOptions3DM, View) Imports a 3DM file into the document.
Public method Import(String, OBJImportOptions, View) Imports an OBJ file into the document.
Public method Import(String, SATImportOptions, View) Imports an SAT file into the document.
Public method Import(String, SKPImportOptions, View) Imports a SKP file into the document.
Public method Import(String, STEPImportOptions, View) Imports a STEP file into the document.
Public method Import(String, STLImportOptions, View) Imports an STL file into the document.
Public method Import(String, DGNImportOptions, View, ElementId ) Imports a DGN file to the document.
Public method Import(String, DWGImportOptions, View, ElementId ) Imports a DWG or DXF file to the document.
Public method IsBackgroundCalculationInProgress Indicates whether there are any background calculations in progress for this document.
Public method IsDefaultElementTypeIdValid Checks whether the element type id is valid for the give DefaultElmentType id.
Public method IsDefaultFamilyTypeIdValid Checks whether the family type id is valid for the give family category.
Public method IsPainted Checks if the element's face is painted with a material.
Public method Static member IsValidVersionGUID Checks whether the GUID is valid for the given document. Empty GUID is allowed.
Public method Link(String, DWFImportOptions) Links Markups in a DWF file into the project document.
Public method Link(String, ImportOptions3DM, View) Links a 3DM file into the project document.
Public method Link(String, OBJImportOptions, View) Links an OBJ file into the project document.
Public method Link(String, SATImportOptions, View) Links an SAT file into the project document.
Public method Link(String, SKPImportOptions, View) Links a SKP file into the project document.
Public method Link(String, STEPImportOptions, View) Links an STEP file into the project document.
Public method Link(String, STLImportOptions, View) Links an STL file into the project document.
Public method Link(String, DGNImportOptions, View, ElementId ) Links a DGN file into the project document.
Public method Link(String, DWGImportOptions, View, ElementId ) Links a DWG or DXF file into the project document.
Public method LoadFamily(Document) Loads the contents of this family document into another document.
Public method LoadFamily(String) Loads an entire family and all its types/symbols into the document.
Public method LoadFamily(Document, IFamilyLoadOptions) Loads the contents of this family document into another document.
Public method Code example LoadFamily(String, Family ) Loads an entire family and all its types/symbols into the document and provides a reference to the loaded family.
Public method LoadFamily(String, IFamilyLoadOptions, Family ) Loads an entire family and all its types/symbols into the document and provides a reference to the loaded family.
Public method LoadFamilySymbol(String, String) Loads only a specified family type/symbol from a family file into the document.
Public method LoadFamilySymbol(String, String, FamilySymbol ) Loads only the specified family type/symbol from a family file into the document and provides a reference to the loaded family symbol.
Public method LoadFamilySymbol(String, String, IFamilyLoadOptions, FamilySymbol ) Loads only the specified family type/symbol from a family file into the document and provides a reference to the loaded family symbol.
Public method MakeTransientElements This method encapsulates the process of creating transient elements in the document.
Public method Code example Paint(ElementId, Face, ElementId) Paint the element's face with specified material.
Public method Code example Paint(ElementId, Face, FamilyParameter) Paint the element's face with specified material.
Public method Code example PostFailure Posts a failure to be displayed to the user at the end of transaction.
Public method Print(ViewSet) Prints a set of views with default view template and default print settings.
Public method Print(ViewSet, View) Prints a set of views with a specified view template and default print settings.
Public method Print(ViewSet, Boolean) Prints a set of views with default view template and default print settings.
Public method Print(ViewSet, View, Boolean) Prints a set of views with a specified view template and default print settings.
Public method PublishCoordinates Publish coordinates to the specified ProjectLocation of the link instance.
Public method Code example Regenerate Updates the elements in the Revit document to reflect all changes.
Public method Code example ReloadLatest Fetches changes from central (due to one or more synchronizations with central) and merges them into the current session.
Public method RemovePaint Remove the material painted on the element's face. If the face is currently not painted,it will do nothing.
Public method ResetSharedCoordinates Reset shared coordinates for the host model/file.
Public method Save Saves the document.
Public method Save(SaveOptions) Saves the document.
Public method SaveAs(String) Saves the document to a given file path.
Public method SaveAs(ModelPath, SaveAsOptions) Saves the document to a given path.
Public method Code example SaveAs(String, SaveAsOptions) Saves the document to a given file path.
Public method SaveAsCloudModel Saves current non-workshared or workshared model as a cloud model or workshared cloud model in BIM 360 Docs or Autodesk Docs.
Public method SaveCloudModel Saves cloud model.
Public method SaveToProjectAsImage Creates an image view from the currently active view.
Public method SeparateElements Separate a set of combinable elements out of combinations they currently belong to.
Public method SetDefaultElementTypeId Sets the default element type id of the given DefaultElementType id.
Public method Code example SetDefaultFamilyTypeId Sets the default family type id for the given family category.
Public method SetUnits Sets the units.
Public method Code example SynchronizeWithCentral Performs reload latest until the model in the current session is up to date and then saves changes back to central. A save to central is performed even if no changes were made.
Public method ToString Returns a string that represents the current object.
(Inherited from Object )
Public method UnpostFailure Deletes the posted failure message associated with a given FailureMessageKey.
Top
See Also