Message 1 of 3
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report
Hello,
I wrote a code to open a drawing and add a view using i-logic code.
The code is as follows, and when I run the rule, an error occurs saying that the parameters are wrong, and the view is not created.
Can someone help me solve this problem?
Dim oDoc As DrawingDocument = ThisApplication.ActiveDocument Dim docName As String = ThisDoc.FileName Dim oSheet As Inventor.Sheet = oDoc.ActiveSheet Dim modelpath As String = "C:\Temp\CYLINDER.iam" Dim oModel As Document = ThisApplication.Documents.Open(modelpath, False) Dim oTG As TransientGeometry = ThisApplication.TransientGeometry Dim point As Point2d = oTG.CreatePoint2d(50, 50) Dim scale As Double = 1 Dim oBaseView As DrawingView oBaseView = oSheet.DrawingViews.AddBaseView(oModel, point, scale, ViewOrientationTypeEnum.kTopViewOrientation, DrawingViewStyleEnum.kFromBaseDrawingViewStyl
Solved! Go to Solution.