Sorry I post before I add my rule
If Drawing="Yes" Then
Dim oDoc As Document
oDoc = ThisDoc.Document
'Create a drawing from the drawing template
Dim templateFile As String
templateFile = "C:\WF\CAD\Inventor 2016\Templates\CUN\CUN.idw" '''Place the path of your template idw
Dim oDrawingDoc As DrawingDocument = ThisApplication.Documents.Add(DocumentTypeEnum.kDrawingDocumentObject,templateFile,True)
oDrawingDoc.Activate()
Dim oSheet As Sheet = oDrawingDoc.Sheets.Item(1)
Dim oPoint1 As Point2d
oPoint1 = ThisApplication.TransientGeometry.CreatePoint2d(50, 50)
Dim oView As DrawingView
oView = oSheet.DrawingViews.AddBaseView(oDoc,oPoint1, 1, ViewOrientationTypeEnum.kFrontViewOrientation, DrawingViewStyleEnum.kHiddenLineDrawingViewStyle)
'oView = oSheet.DrawingViews.AddBaseView(oDoc,oPoint1, 1, ViewOrientationTypeEnum.kFrontViewOrientation, DrawingViewStyleEnum.kHiddenLineDrawingViewStyle)
oDoc.ReleaseReference
End If