i just want to run a rule in an IDW from a rule in an IAM.
ASSY1.IAM Rule 1 which in turn runs ASSY1.IDW Rule2
something like this(which doesnt work)
strfolder =ThisDoc.Path & "\Assembly1.idw"
the files can be hard coded, have the same name in the same directory. the IDW is open.
Solved! Go to Solution.
Seems odd you cannot run a rule in an IDW from a rule in an assembly.
How about opening the IDW from the Assembly then running a rule based on the After Open event?
then can i Close the IDW in the rule in the IDW or should i close the IDW in the rule in the Assembly?
Could you please test this sample code in assembly rule:
'open known drawing document specifying full filename FullFilename = ThisDoc.Path & "\AAA.idw" Dim oDoc as DrawingDocument = ThisApplication.Documents.Open(Fullfilename) 'run rule in the drawing document auto = iLogicVb.Automation auto.RunRule(oDoc, "IDW_Rule") 'you may also save and close this drawing document 'oDoc.Save 'oDoc.Close
Some operations can be completed in invisible mode (this is faster). If this applicable open the drawing document wirh argument Visible = False:
Dim oDoc as DrawingDocument = ThisApplication.Documents.Open(Fullfilename, False)