Message 1 of 3
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report
I am trying to create a rule to update all of the prior templates to the new logic capabilities but have run into a snag. I am attempting to run a rule that opens a new document, which then in turn executes an external rule within the newly opened document. I have gotten the to the point where I can open the file, but not execute the run external rule from the new opened document.
iLogicVb.RunExternalRule("Delete All Rules") iLogicVb.RunExternalRule("Add Local Rule") oPartDoc = ThisDoc.Document.documenttype=Inventor.DocumentTypeEnum.kPartDocumentObject oAssyDoc = ThisDoc.Document.documenttype=Inventor.DocumentTypeEnum.kAssemblyDocumentObject oDrawDoc = ThisDoc.Document.documenttype=Inventor.DocumentTypeEnum.kDrawingDocumentObject Part_Trigger = "\\Innovation\CAD Styles and Materials\Part Triggers.ipt" DWG_Trigger = "\\Innovation\CAD Styles and Materials\Drawing Triggers.idw" If ThisDoc.Document Is ThisApplication.ActiveDocument And oPartDoc = True Then ThisApplication.Documents.Open(Part_Trigger) iLogicVb.RunExternalRule("Set Rule Triggers") ElseIf ThisDoc.Document Is ThisApplication.ActiveDocument And oAssyDoc = True Then ElseIf ThisDoc.Document Is ThisApplication.ActiveDocument And oDrawDoc = True Then ThisApplication.Documents.Open(DWG_Trigger) iLogicVb.RunExternalRule("Set Rule Triggers") End If
Solved! Go to Solution.