Share

AssemblyDocument Object

Derived from: Document Object

Description

The AssemblyDocument object represents an in-memory Inventor assembly document.

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.
GetSelectedObject In order to provide better handling of system resources Inventor does not load all of the data when a document is opened but delays loading information until it is needed. A common need in many programs is to have the user select vertices on parts. Instead of loading the part model in order to return the true selected Vertex, Inventor returns a GenericObject. You can use this method to obtain more information about the selected object. If it is a vertex you can get the point coordinates without forcing the entire model to be loaded, or if you do need to do additional processing that requires access to the full model you can also force that by using the "SelectedObject" argument.
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.
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.
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.
ActiveLightingStyle Gets the active lighting style object.
AllReferencedDocuments Property that returns all the document references of this Document along with all of the recursively nested references.
AppearanceAssets Read-only property that returns an AssetsEnumerator collection object that contains the appearances associated with the document.
Assets Get Assets collection object that contains all of the assets, regardless of type, that are associated with the document.
AssociativeForeignFilename Read-only property that returns the full file name of the associative foreign file. This property returns empty string if the IsEmbeddedDocument returns False.
AttributeManager Returns the AttributeManager object.
AttributeSets Property that returns the AttributeSets collection object associated with this object.
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.
ComponentDefinition Property that returns the object associated with this assembly. For a standard assembly document, an AssemblyComponentDefinition object will be returned. For a weldment assembly, a Weldment object.
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.
DesignViewInfo Gets the design view information for the document as a String containing XML formatted data. For more information on this XML format see More XML Design View Info...
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.
DisplaySettings Property that returns the DisplaySettings object. The DisplaySettings object provides access to various display appearance related document settings.
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.
EmbeddingDocument Read-only property that returns the document in which this document is embedded in. This returns Nothing if the IsEmbeddedDocument is False.
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.
IsEmbeddedDocument Read-only property that returns whether this document is embedded into another 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.
IsOpenExpress Read-write property that gets and sets a Boolean flag indicating whether this assembly is currently open in Express mode. When set this property it can only be set from True to False to load the document into full mode. To switch the document from full mode to express mode users should close it and re-open it in express mode using OpenWithOptions method.
LightingStyles Property that returns the LightingStyles collection object.
MaterialAssets Get AssetsEnumerator object that contains the materials associated with the document.
ModelingSettings Property that returns the ModelingSettings object. The ModelingSettings object provides access to various modeling related document options. This is somewhat equivalent to the Modeling tab of the Document Settings dialog.
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.
ObjectVisibility Property that returns the ObjectVisibility object providing override visibility controls for objects in the document. Changes are not saved with the document.
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.
Parent Property that returns the parent object from whom this object can logically be reached.
PhysicalAssets Get AssetsEnumerator object that contains the physical properties associated with the document.
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.
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.
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.
TextStyles Gets the TextStylesEnumerator object.
Thumbnail Property that returns a bitmap picture of the document.
ThumbnailSaveOption Property that returns the current thumbnail (preview picture) save option.
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

AssemblyComponentDefinition.Parent, AssemblyComponentDefinitions.Parent, WeldmentComponentDefinition.Parent

Samples

Name Description
Adding iAssembly occurrences This sample demonstrates adding iAssembly occurrences to an assembly.
Traverse an Assembly This sample shows how to recursively traverse an assembly and get the count of leaf node components and subassemblies.
Using the BOM APIs This sample demonstrates the Bill of Materials API functionality in assemblies.
Exporting the assembly BOM This sample demonstrates exporting the Assembly BOM to an external file.
Replace content center part This sample demonstrates how to replace the content part referenced by an assembly occurrence.
Derived Parts and Assemblies This sample demonstrates the use of the API to create derived parts and assemblies.

Version

Introduced in version 4

Was this information helpful?