Share

DrawingDocument Object

Derived from: Document Object

Description

The DrawingDocument object provides methods and properties to create, activate, save, and query many properties of individual drawing documents.

Methods

Name Description
Activate Makes this document the active one (receives user-focus).
Close Closes this document.
CreateHighlightSet Method that creates a new highlight set.
FindWhereUsed Method that obtains the set of documents that reference the given file within this document.
GetLocationFoundIn Obtains the name of the location this file was found in.
GetMissingAddInBehavior Method that gets the commands disabled when a particular AddIn is absent.
GetPrivateStorage Obtains a private sub-storage within this document with the given name. Can create one, if one does not exist.
GetPrivateStream Obtains a private stream within this document with the given name. Can create one, if one does not exist.
HasPrivateStorage Obtains a Boolean flag indicating if the specified sub-storage exists within this document.
HasPrivateStream Obtains a Boolean flag indicating if the specified stream exists within this document.
MakeAllViewsPrecise Set all drawing views in the document to be precise views.
MakeAllViewsRaster Set all drawing views in the document to be raster views.
ProcessViewSelection Process object selection according to the context of the document referenced by the containing view.
PutInternalNameAndRevisionId Constructs and sets the Internal Name and Revision Identifier for this Document from strings supplied. This can only be done on a previously un-saved document (New or SaveCopyAs)
Rebuild Performs compute operations on all of the entities within this document's scope as if all of the driving entities had been 'dirtied.'
Rebuild2 Method that performs compute operations on all of the entities within this Document's scope as if all of the driving entities had been 'dirtied'.
ReleaseReference Method that releases the reference that gets added if a document is opened invisibly through the API. Releasing the reference on a hidden document makes it a candidate for closure the next time Inventor closes all unreferenced documents.
ResolveFile Method that invoke the resolve file for the document if there are references missing.
RevertReservedForWriteByMe Method that reverts the file checked out by the caller.
Save Saves this document to disk.
Save2 Method that saves the document and the specified dependent documents.
SaveAs Saves this document into a file of the specified name.
SaveAs2 Saves this document into a file of the specified name.
SaveAsInventorDWG Method that saves the document as an Inventor DWG with the specified name.
SetMissingAddInBehavior Method that sets the commands to be disabled when a particular AddIn is absent.
SetThumbnailSaveOption Method that sets the thumbnail (preview picture) save option.
Update Performs compute operations on all of the entities within this Document's scope that may be out of date with respect to their driving entities.
Update2 Method that performs compute operations on all of the entities within this Document's scope that may be out of date with respect to their driving entities.

Properties

Name Description
ActivatedObject Gets the object that has been in-place activated for edit within the context of this document.
ActiveSheet Property that returns the currently active sheet.
AllReferencedDocuments Property that returns all the document references of this Document along with all of the recursively nested references.
AttributeManager Returns the AttributeManager object.
AttributeSets Property that returns the AttributeSets collection object associated with this object.
AutoCADBlockDefinitions Property that returns the AutoCADBlockDefinitions collection object.
BorderDefinitions Property that returns the BorderDefinitions collection object. This object provides access to all of the border definitions in the document and provides functionality to create new border definitions.
BrowserPanes Property that returns the collection object.
ClientViews Returns document's client views.
Compacted Gets the Boolean that states whether this file has been processed for compaction since the last save.
ContainingDWGDocument Gets the reference to the containing DWG document when this document is stored in a DWG.
DatabaseRevisionId Gets the GUID that represents the last saved revision of database contained in this document. This revision id tracks modifications to the database (such as reference changes, geometry changes, etc.) but does not track file property changes.
DefaultCommand Gets the default command for this document.
Dirty Gets/Sets a Boolean flag indicating if the Document has been written into, since opened.
DisabledCommandList Property that returns the DisabledCommandList object. This object allows the document to disable specific commands. This list contains commands that are disabled in addition to those specified by the DisabledCommandTypes property.
DisabledCommandTypes Bit mask indicating the disabled command types.
DisplayName Gets/Sets the user-displayable name of this Document. Defaults to file-name.
DisplayNameOverridden Read-write property that gets and sets whether the display name of the document has been overridden.
DocumentEvents This object supports a set of events that are specific to the document.
DocumentInterests Property that returns the DocumentInterests collection object.
DocumentSubType Property that returns the subtype of the document.
DocumentType Gets the constant that indicates the type of this document.
DrawingBOMs Property that returns the collection of locally stored BOMs in this drawing document.
DrawingEvents Property that gets the DrawingEvents object. This provides drawing event notification such as onRetrieveDimensions.
DrawingHatchPatternsManager Read-only property that returns the DrawingHatchPatternsManager object.
DrawingSettings The DrawingSettings object provides access to various drawing related document settings. This is somewhat equivalent to the Drawing tab of the Document Settings dialog.
EnvironmentManager Property that returns the EnvironmentManager object.
File Property that returns the file (storage) on disk that contains this document.
FilePropertySets Read-only property that returns the file PropertySets. This is equivalent to the iProperties that got from Shell Extension.
FileSaveCounter Gets the number that indicates the number of times the file has been saved.
FullDocumentName Property that returns the fully qualified name of the document. The string is the full file name concatenated with the document name and is a unique identifier for the document. The document name is returned by the Name property on the Document object.
FullFileName Gets/Sets the fully qualified file-name of this Document.
GraphicsDataSetsCollection Property that returns the object for the document.
HasReferencesMissing Read-only property that returns whether there are references missing for this document.
InternalName Gets the Internal Name (a GUID) for this document.
IsInventorDWG Property that returns whether this is an Inventor DWG document.
IsModifiable Property that returns whether this document can be currently modified. One of the reasons a document may be non-modifiable is if any other document belonging to the file containing this document is currently being edited.
ModelStateName Read-only property that returns the model state that this document represents.
NeedsMigrating Property that returns whether the document needs to be migrated to the current release.
NonTransactingClientGraphicsCollection Read-only property that returns the non-transacting ClientGraphicsCollection object.
NonTransactingGraphicsDataSetsCollection Read-only property that returns the non-transacting GraphicsDataSetsCollection object.
Open Property that returns whether this document is currently open. If False, the document has only been initialized and calling methods or properties on the document could cause it to open.
Parameters Property that returns the set of parameters stored in this drawing document.
Parent Property that returns the parent object from whom this object can logically be reached.
PrintManager Property that returns the PrintManager, or when called from a DrawingDocument it returns a DrawingPrintManager object.
PropertySets Gets the Property Sets object that controls the file's published-format properties.
RecentChanges Gets a bit-encoded value where the bits indicate the kind of changes made to the document since it became dirty.
ReferencedDocumentDescriptors Property that returns an enumeration of descriptors that represent the native document references held by this document.
ReferencedDocuments Property that returns all the documents directly referenced by this document.
ReferencedOLEFileDescriptors Property that returns the collection of linked and embedded files in the document.
ReferencedOLEFileDescriptors2 Gets the collection of OLE attachments made in this Document that match the input type. Returns all OLE attachments if type is kOLEDocumentUnknownObject.
ReferencedOpaqueFileDescriptors Gets the collection of descriptor objects, presenting (editable) information about opaque references held.
ReferenceKeyManager Gets this document's ReferenceKeyManager.
ReferencingDocuments Property that returns all the documents in memory that reference this document. A referencing document may or may not be fully open (i.e. may just be initialized).
RequiresUpdate Gets the Boolean indicating if any of the entities within this document's scope is out of date with respect to their driving entities.
ReservedForWrite Gets the Boolean flag indicating whether this file has been reserved for write by someone.
ReservedForWriteByMe Gets/Sets the Boolean flag indicating whether this file has been reserved for write by the caller.
ReservedForWriteLogin Gets the login of the person who currently holds the reservation to write.
ReservedForWriteName Gets the name of the person who currently holds the reservation to write.
ReservedForWriteTime Gets the time at which the reservation was made.
ReservedForWriteVersion Gets the version within this file that has been reserved for write.
SelectionPreferences Gets the SelectionPreferences.
SelectionPriority Gets and sets the current selection priority for the document.
SelectSet Property that returns the SelectSet object.
SheetFormats Property that returns the SheetFormats collection object.
Sheets Property that returns the Sheets collection object. This object provides access to all of the sheets in the document.
SheetSettings Property that returns the SheetSettings object. The SheetSettings object provides access to various sheet related document options. This is somewhat equivalent to the Sheet tab of the Document Settings dialog.
SketchedSymbolDefinitions Property that returns the SketchedSymbolDefinitions collection object. This object provides access to all of the sketched symbol definitions available for placement in the document and provides functionality to create new sketched symbol definitions.
SketchSettings Property that returns the SketchSettings object. The SketchSettings object provides access to various sketch related document options. This is somewhat equivalent to the Sketch tab of the Document Settings dialog.
SoftwareVersionCreated Gets the object that encapsulates the version of the software with which this document was first created.
SoftwareVersionSaved Gets the object that encapsulates the version of the software with which this document was last saved.
StylesManager Property that returns the DrawingStylesManager object.
SubType Gets/Sets the sub-Type (a published GUID. See DocCLSIDs.h) of this Document. Setting a new sub-Type will invoke a validation sequence and may fail if the operation is invalid.
Thumbnail Property that returns a bitmap picture of the document.
ThumbnailSaveOption Property that returns the current thumbnail (preview picture) save option.
TitleBlockDefinitions Property that returns the TitleBlockDefinitions collection object. This object provides access to all of the title block definition in the document and provides functionality to create new title block definitions.
Type Returns an ObjectTypeEnum indicating this object's type.
UnitsOfMeasure Property that returns the UnitsOfMeasure object.
VBAProject Property that returns the Autodesk Inventor VBA project for this document.
Views Gets all the open views of this document in a collection.

Accessed From

AutoCADBlockDefinition.Parent, BorderDefinition.Parent, DrawingBOM.Parent, DrawingEvents.Parent, DrawingHatchPatternsManager.Parent, DrawingSettings.Parent, DrawingStylesManager.Parent, SheetFormat.Parent, SheetSettings.Parent, SketchedSymbolDefinition.Parent, TitleBlockDefinition.Parent

Samples

Name Description
Balloons - edit This sample demonstrates the editing of balloons in a drawing.
Creation a balloon This sample demonstrates the creation of a balloon.
Find component referenced by balloon This sample demonstrates how to find the component that a balloon references.
Custom Table - create This sample demonstrates how to create a custom table.
Title Block Definition Create and Insert This sample illustrates creating a new title block definition object and inserting it into the active sheet. This sample consists of two subs. The first demonstrates the creation of a title block definition and the second inserts it into the active sheet.
Copying a title block definition This sample demonstrates copying a title block definition from one drawing to another and replacing the existing title blocks in the drawing with the new title block.

Version

Introduced in version 4

Was this information helpful?