Message 1 of 5
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report
I'm trying to get started in the drawing environment with iLogic. But I can't even get the base view in. I'm referencing the API help "Adding Representation Views Api Sample". I won't have a LOD option but will need the view rep eventually which the API walks me through the .AddBaseView syntax. But I'm hoping someone can tell me why this is erroring out on the .AddBaseView Line.
Dim doc As DrawingDocument doc = ThisApplication.ActiveDocument Dim oSheet As Sheet oSheet = doc.ActiveSheet Dim modDoc As Document modDoc = ThisApplication.Documents.Open("C:\test.iam", False) oTG = ThisApplication.TransientGeometry Dim oPoint As Point2d oPoint = ThisApplication.oTG.CreatePoint2d(5, 5) Dim oBVO As NameValueMap oBVO = ThisApplication.TransientObjects.CreateNameValueMap Dim oScale As Double oScale = 0.125 Dim oViewName As String oViewName = "test" 'MsgBox ("Made it thus far") 'Base View Options 'Call oBVO.Add("PositionalRepresentation", oViewName) 'Call oBVO.Add("DesignViewAssociative", True) oModelDoc = ThisDrawing.ModelDocument 'Get full file path of model Dim oBaseView As DrawingView oBaseView = oSheet.DrawingViews.AddBaseView(oModelDoc,oPoint,oScale,kFrontViewOrientation,kHiddenLineRemovedDrawingViewStyle)
Solved! Go to Solution.