Announcements
Attention for Customers without Multi-Factor Authentication or Single Sign-On - OTP Verification rolls out April 2025. Read all about it here.
jishee
in reply to: jishee

Here is the code.

 

Dim oPartDoc As AssemblyDocument
oPartDoc = ThisApplication.Documents.Open("C:\Users\jishee\Documents\Work\Inventor_modeling\Dimensioning_Test\U001_Assembly.iam", False)

Dim oDrawingDoc As DrawingDocument
oDrawingDoc = ThisApplication.ActiveDocument
	
Dim oSheet As Sheet
oSheet = oDrawingDoc.Sheets.Item(1)

Dim oPoint1 As Point2d
oPoint1 = ThisApplication.TransientGeometry.CreatePoint2d(4.5#, 6#)
	
Dim oView1 As DrawingView
oView1 = oSheet.DrawingViews.AddBaseView(oPartDoc, oPoint1, 0.03125#, kFrontViewOrientation, kHiddenLineRemovedDrawingViewStyle)

ActiveSheet.View(oView1.Name).SetCenter(4.5, 6)

Call oPartDoc.Close(True)