Show / Hide Table of Contents

Class DocumentShim

Methods that extended the Inventor.Document object with additional functionality.

Inheritance
System.Object
DocumentShim
Inherited Members
System.Object.ToString()
System.Object.Equals(System.Object)
System.Object.Equals(System.Object, System.Object)
System.Object.ReferenceEquals(System.Object, System.Object)
System.Object.GetHashCode()
System.Object.GetType()
System.Object.MemberwiseClone()
Namespace: InventorShims
Assembly: InventorShims.dll
Syntax
public static class DocumentShim

Methods

| Improve this Doc View Source

AssemblyDocuments(IEnumerable<Document>)

Returns an IEnumerable{AssemblyDocument} of just the AssemblyDocuments from an IEnumerable{Document} collection.

Declaration
public static IEnumerable<AssemblyDocument> AssemblyDocuments(this IEnumerable<Document> documents)
Parameters
Type Name Description
System.Collections.Generic.IEnumerable<Inventor.Document> documents
Returns
Type Description
System.Collections.Generic.IEnumerable<Inventor.AssemblyDocument>
| Improve this Doc View Source

DrawingDocuments(IEnumerable<Document>)

Returns an IEnumerable{AssemblyDocument} of just the DrawingDocuments from an IEnumerable{Document} collection.

Declaration
public static IEnumerable<DrawingDocument> DrawingDocuments(this IEnumerable<Document> documents)
Parameters
Type Name Description
System.Collections.Generic.IEnumerable<Inventor.Document> documents
Returns
Type Description
System.Collections.Generic.IEnumerable<Inventor.DrawingDocument>
| Improve this Doc View Source

EnumerateAllLeafOccurrencesDocumentDescriptors(AssemblyDocument)

Returns an IEnumerable{DocumentDescriptors} of all leaf documents in an AssemblyDocument object.

Declaration
public static IEnumerable<DocumentDescriptor> EnumerateAllLeafOccurrencesDocumentDescriptors(this AssemblyDocument document)
Parameters
Type Name Description
Inventor.AssemblyDocument document
Returns
Type Description
System.Collections.Generic.IEnumerable<Inventor.DocumentDescriptor>
| Improve this Doc View Source

EnumerateAllReferencedDocuments(AssemblyDocument)

Returns an IEnumerable{Document} of all referenced documents in an AssemblyDocument object.

Declaration
public static IEnumerable<Document> EnumerateAllReferencedDocuments(this AssemblyDocument document)
Parameters
Type Name Description
Inventor.AssemblyDocument document
Returns
Type Description
System.Collections.Generic.IEnumerable<Inventor.Document>
| Improve this Doc View Source

EnumerateAllReferencedDocuments(Document)

Returns an IEnumerable{Document} of all referenced documents in a Document object.

Declaration
public static IEnumerable<Document> EnumerateAllReferencedDocuments(this Document document)
Parameters
Type Name Description
Inventor.Document document
Returns
Type Description
System.Collections.Generic.IEnumerable<Inventor.Document>
| Improve this Doc View Source

EnumerateAllReferencedDocuments(DrawingDocument)

Returns an IEnumerable{Document} of all referenced documents in a DrawingDocument object.

Declaration
public static IEnumerable<Document> EnumerateAllReferencedDocuments(this DrawingDocument document)
Parameters
Type Name Description
Inventor.DrawingDocument document
Returns
Type Description
System.Collections.Generic.IEnumerable<Inventor.Document>
| Improve this Doc View Source

EnumerateAllReferencedDocuments(PartDocument)

Returns an IEnumerable{Document} of all referenced documents in a PartDocument object.

Declaration
public static IEnumerable<Document> EnumerateAllReferencedDocuments(this PartDocument document)
Parameters
Type Name Description
Inventor.PartDocument document
Returns
Type Description
System.Collections.Generic.IEnumerable<Inventor.Document>
| Improve this Doc View Source

EnumerateAllReferencedDocuments(PresentationDocument)

Returns an IEnumerable{Document} of all referenced documents in a PresentationDocument object.

Declaration
public static IEnumerable<Document> EnumerateAllReferencedDocuments(this PresentationDocument document)
Parameters
Type Name Description
Inventor.PresentationDocument document
Returns
Type Description
System.Collections.Generic.IEnumerable<Inventor.Document>
| Improve this Doc View Source

EnumerateDocuments(SelectSet)

Returns an IEnumerable collection of Inventor.Document from a SelectSet object.

Declaration
public static IEnumerable<Document> EnumerateDocuments(this SelectSet selectSet)
Parameters
Type Name Description
Inventor.SelectSet selectSet

Inventor.SelectionSet

Returns
Type Description
System.Collections.Generic.IEnumerable<Inventor.Document>

IEnumerable Document

Exceptions
Type Condition
System.ArgumentNullException

Throws an error if the selection set is empty.

| Improve this Doc View Source

EnumerateDocuments(IEnumerable<DocumentDescriptor>)

Returns an IEnumerable collection of Inventor.Document from a DocumentDescriptor object.

Declaration
public static IEnumerable<Document> EnumerateDocuments(this IEnumerable<DocumentDescriptor> documentDiscriptors)
Parameters
Type Name Description
System.Collections.Generic.IEnumerable<Inventor.DocumentDescriptor> documentDiscriptors
Returns
Type Description
System.Collections.Generic.IEnumerable<Inventor.Document>

IEnumerable Document

| Improve this Doc View Source

EnumerateReferencedDocumentDescriptors(AssemblyDocument)

Returns an IEnumerable{DocumentDescriptors} of referenced documents in a AssemblyDocument object.

Declaration
public static IEnumerable<DocumentDescriptor> EnumerateReferencedDocumentDescriptors(this AssemblyDocument document)
Parameters
Type Name Description
Inventor.AssemblyDocument document
Returns
Type Description
System.Collections.Generic.IEnumerable<Inventor.DocumentDescriptor>
| Improve this Doc View Source

EnumerateReferencedDocumentDescriptors(Document)

Returns an IEnumerable{DocumentDescriptors} of referenced documents in a Document object.

Declaration
public static IEnumerable<DocumentDescriptor> EnumerateReferencedDocumentDescriptors(this Document document)
Parameters
Type Name Description
Inventor.Document document
Returns
Type Description
System.Collections.Generic.IEnumerable<Inventor.DocumentDescriptor>
| Improve this Doc View Source

EnumerateReferencedDocumentDescriptors(DrawingDocument)

Returns an IEnumerable{DocumentDescriptors} of referencing documents in a DrawingDocument object.

Declaration
public static IEnumerable<DocumentDescriptor> EnumerateReferencedDocumentDescriptors(this DrawingDocument document)
Parameters
Type Name Description
Inventor.DrawingDocument document
Returns
Type Description
System.Collections.Generic.IEnumerable<Inventor.DocumentDescriptor>
| Improve this Doc View Source

EnumerateReferencedDocumentDescriptors(PartDocument)

Returns an IEnumerable{DocumentDescriptors} of referenced documents in a PartDocument object.

Declaration
public static IEnumerable<DocumentDescriptor> EnumerateReferencedDocumentDescriptors(this PartDocument document)
Parameters
Type Name Description
Inventor.PartDocument document
Returns
Type Description
System.Collections.Generic.IEnumerable<Inventor.DocumentDescriptor>
| Improve this Doc View Source

EnumerateReferencedDocumentDescriptors(PresentationDocument)

Returns an IEnumerable{DocumentDescriptors} of referenced documents in a PresentationDocument object.

Declaration
public static IEnumerable<DocumentDescriptor> EnumerateReferencedDocumentDescriptors(this PresentationDocument document)
Parameters
Type Name Description
Inventor.PresentationDocument document
Returns
Type Description
System.Collections.Generic.IEnumerable<Inventor.DocumentDescriptor>
| Improve this Doc View Source

EnumerateReferencedDocuments(AssemblyDocument)

Returns an IEnumerable{Document} of referenced documents in an AssemblyDocument object.

Declaration
public static IEnumerable<Document> EnumerateReferencedDocuments(this AssemblyDocument document)
Parameters
Type Name Description
Inventor.AssemblyDocument document
Returns
Type Description
System.Collections.Generic.IEnumerable<Inventor.Document>
| Improve this Doc View Source

EnumerateReferencedDocuments(Document)

Returns an IEnumerable{Document} of referenced documents in a Document object.

Declaration
public static IEnumerable<Document> EnumerateReferencedDocuments(this Document document)
Parameters
Type Name Description
Inventor.Document document
Returns
Type Description
System.Collections.Generic.IEnumerable<Inventor.Document>
| Improve this Doc View Source

EnumerateReferencedDocuments(DrawingDocument)

Returns an IEnumerable{Document} of referenced documents in a DrawingDocument object.

Declaration
public static IEnumerable<Document> EnumerateReferencedDocuments(this DrawingDocument document)
Parameters
Type Name Description
Inventor.DrawingDocument document
Returns
Type Description
System.Collections.Generic.IEnumerable<Inventor.Document>
| Improve this Doc View Source

EnumerateReferencedDocuments(PartDocument)

Returns an IEnumerable{Document} of referenced documents in a PartDocument object.

Declaration
public static IEnumerable<Document> EnumerateReferencedDocuments(this PartDocument document)
Parameters
Type Name Description
Inventor.PartDocument document
Returns
Type Description
System.Collections.Generic.IEnumerable<Inventor.Document>
| Improve this Doc View Source

EnumerateReferencedDocuments(PresentationDocument)

Returns an IEnumerable{Document} of referenced documents in a PresentationDocument object.

Declaration
public static IEnumerable<Document> EnumerateReferencedDocuments(this PresentationDocument document)
Parameters
Type Name Description
Inventor.PresentationDocument document
Returns
Type Description
System.Collections.Generic.IEnumerable<Inventor.Document>
| Improve this Doc View Source

EnumerateReferencingDocuments(AssemblyDocument)

Returns an IEnumerable{Document} of referencing documents in an AssemblyDocument object.

Declaration
public static IEnumerable<Document> EnumerateReferencingDocuments(this AssemblyDocument document)
Parameters
Type Name Description
Inventor.AssemblyDocument document
Returns
Type Description
System.Collections.Generic.IEnumerable<Inventor.Document>
| Improve this Doc View Source

EnumerateReferencingDocuments(Document)

Returns an IEnumerable{Document} of referencing documents in a Document object.

Declaration
public static IEnumerable<Document> EnumerateReferencingDocuments(this Document document)
Parameters
Type Name Description
Inventor.Document document
Returns
Type Description
System.Collections.Generic.IEnumerable<Inventor.Document>
| Improve this Doc View Source

EnumerateReferencingDocuments(DrawingDocument)

Returns an IEnumerable{Document} of referencing documents in a DrawingDocument object.

Declaration
public static IEnumerable<Document> EnumerateReferencingDocuments(this DrawingDocument document)
Parameters
Type Name Description
Inventor.DrawingDocument document
Returns
Type Description
System.Collections.Generic.IEnumerable<Inventor.Document>
| Improve this Doc View Source

EnumerateReferencingDocuments(PartDocument)

Returns an IEnumerable{Document} of referencing documents in a PartDocument object.

Declaration
public static IEnumerable<Document> EnumerateReferencingDocuments(this PartDocument document)
Parameters
Type Name Description
Inventor.PartDocument document
Returns
Type Description
System.Collections.Generic.IEnumerable<Inventor.Document>
| Improve this Doc View Source

EnumerateReferencingDocuments(PresentationDocument)

Returns an IEnumerable{Document} of referencing documents in a PresentationDocument object.

Declaration
public static IEnumerable<Document> EnumerateReferencingDocuments(this PresentationDocument document)
Parameters
Type Name Description
Inventor.PresentationDocument document
Returns
Type Description
System.Collections.Generic.IEnumerable<Inventor.Document>
| Improve this Doc View Source

GetDocumentFromObject(Object)

Tries to get an Inventor.Document object from a supplied object. If one is found it will be returned; if not, null is returned.

Declaration
public static Document GetDocumentFromObject(this object obj)
Parameters
Type Name Description
System.Object obj

Object

Returns
Type Description
Inventor.Document

Inventor.Document

| Improve this Doc View Source

GetDocumentsFromSelectSet(SelectSet)

Returns a list of Documents from a provided SelectSet. If no Documents are found, an empty list is returned. Only unique documents objects are returned.

Declaration
public static List<Document> GetDocumentsFromSelectSet(this SelectSet selectSet)
Parameters
Type Name Description
Inventor.SelectSet selectSet

Inventor.SelectSet

Returns
Type Description
System.Collections.Generic.List<Inventor.Document>

List(of Documents)

| Improve this Doc View Source

IsAssembly(Document)

Returns true if document is an assembly

Declaration
public static bool IsAssembly(this Document documentToTest)
Parameters
Type Name Description
Inventor.Document documentToTest
Returns
Type Description
System.Boolean
| Improve this Doc View Source

IsContentCenter(AssemblyDocument)

Checks if an AssemblyDocument is a ContentCenter part; returns false.

Declaration
public static bool IsContentCenter(this AssemblyDocument document)
Parameters
Type Name Description
Inventor.AssemblyDocument document
Returns
Type Description
System.Boolean
| Improve this Doc View Source

IsContentCenter(Document)

Checks if a Document is a ContentCenter part; returns a bool.

Declaration
public static bool IsContentCenter(this Document document)
Parameters
Type Name Description
Inventor.Document document
Returns
Type Description
System.Boolean
| Improve this Doc View Source

IsContentCenter(PartDocument)

Checks if a PartDocument is a ContentCenter part; returns a bool.

Declaration
public static bool IsContentCenter(this PartDocument document)
Parameters
Type Name Description
Inventor.PartDocument document
Returns
Type Description
System.Boolean
| Improve this Doc View Source

IsContentCenter(PresentationDocument)

Checks if a PresentationDocument is a ContentCenter part; returns false.

Declaration
public static bool IsContentCenter(this PresentationDocument document)
Parameters
Type Name Description
Inventor.PresentationDocument document
Returns
Type Description
System.Boolean
| Improve this Doc View Source

IsCustomContentCenter(AssemblyDocument)

Checks if an AssemblyDocument is a Custom ContentCenter part; returns false.

Declaration
public static bool IsCustomContentCenter(this AssemblyDocument document)
Parameters
Type Name Description
Inventor.AssemblyDocument document
Returns
Type Description
System.Boolean
| Improve this Doc View Source

IsCustomContentCenter(Document)

Checks if a Document is a Custom ContentCenter part; returns a bool.

Declaration
public static bool IsCustomContentCenter(this Document document)
Parameters
Type Name Description
Inventor.Document document
Returns
Type Description
System.Boolean
| Improve this Doc View Source

IsCustomContentCenter(DrawingDocument)

Checks if a DrawingDocument is a Custom ContentCenter part; returns false.

Declaration
public static bool IsCustomContentCenter(this DrawingDocument document)
Parameters
Type Name Description
Inventor.DrawingDocument document
Returns
Type Description
System.Boolean
| Improve this Doc View Source

IsCustomContentCenter(PartDocument)

Checks if a PartDocument is a Custom ContentCenter part; returns a bool.

Declaration
public static bool IsCustomContentCenter(this PartDocument document)
Parameters
Type Name Description
Inventor.PartDocument document
Returns
Type Description
System.Boolean
| Improve this Doc View Source

IsCustomContentCenter(PresentationDocument)

Checks if a PresentationDocument is a Custom ContentCenter part; returns false.

Declaration
public static bool IsCustomContentCenter(this PresentationDocument document)
Parameters
Type Name Description
Inventor.PresentationDocument document
Returns
Type Description
System.Boolean
| Improve this Doc View Source

IsDrawing(Document)

Returns true if document is a drawing

Declaration
public static bool IsDrawing(this Document documentToTest)
Parameters
Type Name Description
Inventor.Document documentToTest
Returns
Type Description
System.Boolean
| Improve this Doc View Source

IsForeignModel(Document)

Returns true if document is a ForeignModel

Declaration
public static bool IsForeignModel(this Document documentToTest)
Parameters
Type Name Description
Inventor.Document documentToTest
Returns
Type Description
System.Boolean
| Improve this Doc View Source

IsPart(Document)

Returns true if document is a part

Declaration
public static bool IsPart(this Document documentToTest)
Parameters
Type Name Description
Inventor.Document documentToTest
Returns
Type Description
System.Boolean
| Improve this Doc View Source

IsPresentation(Document)

Returns true if document is a presentation

Declaration
public static bool IsPresentation(this Document documentToTest)
Parameters
Type Name Description
Inventor.Document documentToTest
Returns
Type Description
System.Boolean
| Improve this Doc View Source

IsSat(Document)

Returns true if document is an SAT reference

Declaration
public static bool IsSat(this Document documentToTest)
Parameters
Type Name Description
Inventor.Document documentToTest
Returns
Type Description
System.Boolean
| Improve this Doc View Source

IsUnknown(Document)

Returns true if document is unknown

Declaration
public static bool IsUnknown(this Document documentToTest)
Parameters
Type Name Description
Inventor.Document documentToTest
Returns
Type Description
System.Boolean
| Improve this Doc View Source

ObjectIsDocument(Object)

Returns true if an object is an Inventor Document.

Declaration
public static bool ObjectIsDocument(dynamic obj)
Parameters
Type Name Description
System.Object obj

Object

Returns
Type Description
System.Boolean

Boolean

| Improve this Doc View Source

OrbitToIsoFrontRightTop(Document)

Orbits around the part/assembly to show the view from a front isometric angle on the view cube

Declaration
public static void OrbitToIsoFrontRightTop(this Document documentToWork)
Parameters
Type Name Description
Inventor.Document documentToWork

Document object

| Improve this Doc View Source

PartDocuments(IEnumerable<Document>)

Returns an IEnumerable{AssemblyDocument} of just the PartDocuments from an IEnumerable{Document} collection.

Declaration
public static IEnumerable<PartDocument> PartDocuments(this IEnumerable<Document> documents)
Parameters
Type Name Description
System.Collections.Generic.IEnumerable<Inventor.Document> documents
Returns
Type Description
System.Collections.Generic.IEnumerable<Inventor.PartDocument>
| Improve this Doc View Source

PresentationDocuments(IEnumerable<Document>)

Returns an IEnumerable{AssemblyDocument} of just the PresentationDocuments from an IEnumerable{Document} collection.

Declaration
public static IEnumerable<PresentationDocument> PresentationDocuments(this IEnumerable<Document> documents)
Parameters
Type Name Description
System.Collections.Generic.IEnumerable<Inventor.Document> documents
Returns
Type Description
System.Collections.Generic.IEnumerable<Inventor.PresentationDocument>
| Improve this Doc View Source

RemoveAssemblyDocuments(IEnumerable<Document>)

Returns an IEnumerable{Document} with the AssemblyDocuments removed from an IEnumerable{Document} collection.

Declaration
public static IEnumerable<Document> RemoveAssemblyDocuments(this IEnumerable<Document> documents)
Parameters
Type Name Description
System.Collections.Generic.IEnumerable<Inventor.Document> documents
Returns
Type Description
System.Collections.Generic.IEnumerable<Inventor.Document>
| Improve this Doc View Source

RemoveDrawingDocuments(IEnumerable<Document>)

Returns an IEnumerable{Document} with the DrawingDocuments removed from an IEnumerable{Document} collection.

Declaration
public static IEnumerable<Document> RemoveDrawingDocuments(this IEnumerable<Document> documents)
Parameters
Type Name Description
System.Collections.Generic.IEnumerable<Inventor.Document> documents
Returns
Type Description
System.Collections.Generic.IEnumerable<Inventor.Document>
| Improve this Doc View Source

RemoveNonNativeDocuments(IEnumerable<Document>)

Returns an IEnumerable{Document} with the Non-Native Documents (ForeignModel, SAT, Unknown) removed from an IEnumerable{Document} collection.

Declaration
public static IEnumerable<Document> RemoveNonNativeDocuments(this IEnumerable<Document> documents)
Parameters
Type Name Description
System.Collections.Generic.IEnumerable<Inventor.Document> documents
Returns
Type Description
System.Collections.Generic.IEnumerable<Inventor.Document>
| Improve this Doc View Source

RemovePartDocuments(IEnumerable<Document>)

Returns an IEnumerable{Document} with the PartDocuments removed from an IEnumerable{Document} collection.

Declaration
public static IEnumerable<Document> RemovePartDocuments(this IEnumerable<Document> documents)
Parameters
Type Name Description
System.Collections.Generic.IEnumerable<Inventor.Document> documents
Returns
Type Description
System.Collections.Generic.IEnumerable<Inventor.Document>
| Improve this Doc View Source

RemovePresentationDocuments(IEnumerable<Document>)

Returns an IEnumerable{Document} with the PresentationDocuments removed from an IEnumerable{Document} collection.

Declaration
public static IEnumerable<Document> RemovePresentationDocuments(this IEnumerable<Document> documents)
Parameters
Type Name Description
System.Collections.Generic.IEnumerable<Inventor.Document> documents
Returns
Type Description
System.Collections.Generic.IEnumerable<Inventor.Document>
| Improve this Doc View Source

ReturnSpecificDocumentObject(Document)

Returns a Document Object subtype if a subtype exists. If not, a generic Inventor.Document is returned.

Declaration
public static dynamic ReturnSpecificDocumentObject(this Document document)
Parameters
Type Name Description
Inventor.Document document

Document object

Returns
Type Description
System.Object

dynamic

| Improve this Doc View Source

SaveSilently(Document)

Saves the document without showing anything to the user

Declaration
public static void SaveSilently(this Document document)
Parameters
Type Name Description
Inventor.Document document

Document object

| Improve this Doc View Source

ScreenShot(Document, String, Boolean, Boolean)

Takes a screenshot of the document

Declaration
public static void ScreenShot(this Document documentToWork, string locationToSaveImage, bool setWhiteBg = false, bool orbitToIso = false)
Parameters
Type Name Description
Inventor.Document documentToWork

Document object

System.String locationToSaveImage
System.Boolean setWhiteBg
System.Boolean orbitToIso
| Improve this Doc View Source

ZoomExtents(Document)

Zooms extents in a drawing, part, or assembly.

Declaration
public static void ZoomExtents(this Document documentToWork)
Parameters
Type Name Description
Inventor.Document documentToWork

Document object

  • Improve this Doc
  • View Source
In This Article
Back to top Generated by DocFX