Message 1 of 4
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report
Hi all
I am currently trying to avoid scratching a bald spot into my head trying to figure out why my code is being temperamental.
I have placed the projected view code into it's own function which works when I am using an Assembly but then throws an error when I am using a Part. I think I have managed to hard code as many of the inputs as I can all with the same results for testing purposes, with the error being "The parameter is incorrect. (Exception from HRESULT: 0x80070057 (E_INVALIDARG))"
Public Shared Function AddProjectionToDrawing(ByVal oSheet As Sheet, ByVal oParentView As DrawingView, Optional ViewInfo As Collection = Nothing, Optional oCentrePoint As Inventor.Point2d = Nothing) As DrawingView
If IsNothing(ViewInfo) And IsNothing(oCentrePoint) Then Exit Function
Dim oProjectedView As DrawingView
If IsNothing(ViewInfo) Then
oProjectedView = oSheet.DrawingViews.AddProjectedView(oParentView, g_inventorApplication.TransientGeometry.CreatePoint2d(oCentrePoint.X, oCentrePoint.Y), DrawingViewStyleEnum.kFromBaseDrawingViewStyle)
Else
oProjectedView = oSheet.DrawingViews.AddProjectedView(oParentView, g_inventorApplication.TransientGeometry.CreatePoint2d(ViewInfo.Item(7), ViewInfo.Item(8)), DrawingViewStyleEnum.kFromBaseDrawingViewStyle)
End If
If Not IsNothing(oProjectedView) Then AddProjectionToDrawing = oProjectedView
End Function
Would the issue be in the base view/my code/known bug?
Solved! Go to Solution.