. (Exception from HRESULT: 0x80070057 (E_INVALIDARG)) When adding new base view

. (Exception from HRESULT: 0x80070057 (E_INVALIDARG)) When adding new base view

Anonymous
Not applicable
581 Views
2 Replies
Message 1 of 3

. (Exception from HRESULT: 0x80070057 (E_INVALIDARG)) When adding new base view

Anonymous
Not applicable

 

Dim oDrawingDoc As DrawingDocument
 oDrawingDoc = ThisApplication.ActiveDocument 
     
Dim oSheet As Sheet
     oSheet = oDrawingDoc.Sheets.Item(1)
       
Dim oPoint1 As Point2d
     oPoint1 = ThisApplication.TransientGeometry.CreatePoint2d(5, 5)


Dim oPartDoc As Document
     oPartDoc = ThisApplication.Documents.Open("D:\Vault\Designs\testpart Flat.ipt", False)

Dim oView10 As DrawingView
                                                                 
    oView10 = oSheet.DrawingViews.AddBaseView(oPartDoc, oPoint1, 1, kFrontViewOrientation, kHiddenLineDrawingViewStyle)


Call oPartDoc.Close(True)

 

0 Likes
582 Views
2 Replies
Replies (2)
Message 2 of 3

BrandonBG
Collaborator
Collaborator

Try

 

oView10 = oSheet.DrawingViews.AddBaseView(oPartDoc, oPoint1, 1, ViewOrientationTypeEnum.kFrontViewOrientation, DrawingViewStyleEnum.kHiddenLineDrawingViewStyle)

Brandon

Message 3 of 3

Anonymous
Not applicable
Thank you
0 Likes