Message 1 of 4
Ilogic - run external run from assembly in each newly created idw

Not applicable
01-23-2017
03:10 PM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report
Hi
I have an ilogic rule that creates an idw of all files beginning with the same 3 numbers as the assembly.
I want to run another external rule in all of these newly created idw's from within the same rule.
Below is my rule:-
SyntaxEditor Code Snippet
'Define the open document Dim oDoc As Document oDoc = ThisDoc.Document 'Look at all of the files referenced in the open document Dim docFile As Document ModelName = IO.Path.GetFileName(ThisDoc.ModelDocument.FullFileName) 'MessageBox.Show(ModelName) DP= Left(ModelName,3) 'MessageBox.Show(DP) If Not ThisApplication.ActiveDocument.DocumentType = kAssemblyDocumentObject Then Return End If For Each docFile In oDoc.AllReferencedDocuments Dim FileNameTemp As String = (Left (docFile.DisplayName, 3)) If FileNameTemp.ToUpper = DP Then 'open the indexed file 'true opens the file normaly 'false opens the file programatically without generating the graphics ThisApplication.Documents.Open(docFile.FullFileName, False) 'zoom to front view all iLogicVb.RunExternalRule("Apply front view") auto = iLogicVb.Automation auto.RunExternalRule(docFile,"Draw all from assembly1") 'run external rule on opened docFile 'auto.RunExternalRule(docFile,"Draw all - Drawing rules2017") 'run external rule on opened docFile 'you may also save And close this drawing document docFile.Save docFile.Close End If Next iLogicVb.UpdateWhenDone = True
I want to run the rule "Draw all - Drawing rules 2017" in all the new idw's,(commented out) I think is is something to do with "docfile" maybe needs something with "ThisDrawing" in in?