- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report
Hi. I am working in Inventor 2021. I have an assembly file that I want to add a rule to launch a template drawing, insert 2 different base views, add some leaders, dimensions and a table based on the assembly file parameters.
The rule works well to open the template file but when inserting the first base view I am getting the following error:
"Error in rule: Create drawing, in document: 1-Bar program for 300T umbilical reel lift beam2.iam
Unspecified error (Exception from HRESULT: 0x80004005 (E_FAIL))"
I've googled that error and it seems to happen in different software's and for different reasons. Any help is much appreciated as I still have a long way ahead to get the final product completed.
The code is as follows:
'create drawing Dim oDrawingDoc As DrawingDocument Dim DWGTemplate As String = "C:\Autodesk\Workspace\Inventor\Projetos\Teste\1-bar program test\300T SB for reel lifts\Benton Solutions.idw" oDrawingDoc = ThisApplication.Documents.Add(kDrawingDocumentObject, DWGTemplate, True) fpath = ThisDoc.Path fname = ThisDoc.FileName oAssyDocPath = fpath + "\" + fname + ".iam" oAssyDoc = ThisApplication.Documents.Open(oAssyDocPath, False) oSheet = oDrawingDoc.Sheets.Item(1) oTG = ThisApplication.TransientGeometry oPoint1 = oTG.CreatePoint2d(5, 5) oBaseView = oSheet.DrawingViews.AddBaseView(oDrawingDoc, oPoint1, 1, ViewOrientationTypeEnum.kIsoTopLeftViewOrientation, DrawingViewStyleEnum.kHiddenLineRemovedDrawingViewStyle, "Default")
Solved! Go to Solution.