Hello All,
Iam trying to generate automated drawing for my assembly and iam trying to run the following code
Imports Inventor.ViewOrientationTypeEnum
Imports Inventor.DrawingViewStyleEnum
dim oDrawingDoc as DrawingDocument
dim oPartDoc as Document
dim oSheet as sheet
dim oTG as TransientGeometry
dim oView1 as DrawingView
dwgQuery=msgbox("Would you like to Create a drawing for this glass?", vbyesno,"Drawing Selection")
if dwgQuery = vbYes then
oPartDoc = ThisDoc.Document
oDrawingDoc = ThisApplication.documents.Add(kDrawingDocumentObject, _
"C:\Users\s.babu\Downloads\inventor2012\template.idw", True)
oSheet = oDrawingDoc.Sheets.Item(1)
oPoint1 = ThisApplication.TransientGeometry.CreatePoint2d(5#, 5#)
oView1 = oSheet.DrawingViews.AddBaseView(oPartDoc, _
oPoint1, _
1/10#, _
kFrontViewOrientation, _
kHiddenLineDrawingViewStyle)
end if
but when i run the code its asks me whether you want to generate the drawings, but when i say yes shows runtime argument error as show below
Error in rule: Rule0, in document: pin
The parameter is incorrect. (Exception from HRESULT: 0x80070057 (E_INVALIDARG))
when i ask for more info it shows the following error
System.ArgumentException: The parameter is incorrect. (Exception from HRESULT: 0x80070057 (E_INVALIDARG))
at System.RuntimeType.ForwardCallToInvokeMember(String memberName, BindingFlags flags, Object target, Int32[] aWrapperTypes, MessageData& msgData)
at Inventor.Documents.Add(DocumentTypeEnum DocumentType, String TemplateFileName, Boolean CreateVisible)
at LmiRuleScript.Main()
at Autodesk.iLogic.Exec.AppDomExec.ExecRuleInAssembly(Assembly assem)
at iLogic.RuleEvalContainer.ExecRuleEval(String execRule)
someone please help me on this.
Thanks and Regards,
Shiva Babu