Skip to content
This repository was archived by the owner on Sep 10, 2025. It is now read-only.

Using the API

Bret Leasure edited this page May 1, 2024 · 3 revisions

Extension Methods

Extension methods have been added to the DrawingDocument and DrawingView types to add and remove View References. Using the DrawingDocument methods will modify all drawing views in the document, while using the DrawingView methods will only modify that specific view.

DrawingDocument

Method Name Description
AddViewReferences() Adds references to all views in the drawing document using default settings
AddViewReferences(ViewReferenceSettings) Adds references to all views in the drawing document using provided settings
RemoveViewReferences() Removes references from all views in the drawing document

DrawingView

Method Name Description
AddViewReference() Adds references to drawing view using default settings
AddViewReference(ViewReferenceSettings) Adds references to drawing view using provided settings
RemoveViewReference() Removes references from drawing view

C# Example

var dwgDoc = (DrawingDocument)inventorApp.Documents.Open(@"C:\Work\MyDrawing.idw");

dwgDoc.AddViewReferences();

iLogic Example

AddReference "ViewReference"
Imports ViewReference

Dim dwgDoc As DrawingDocument
dwgDoc = ThisDoc.Document

dwgDoc.AddViewRerences()

Clone this wiki locally