Ilogic runrule in idw from rule in assembly

Ilogic runrule in idw from rule in assembly

Anonymous
Not applicable
3,063 Views
3 Replies
Message 1 of 4

Ilogic runrule in idw from rule in assembly

Anonymous
Not applicable

 

 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"

iLogicVb.RunRule(strfolder, "sav_idw_as_dwg")

 

the files can be hard coded, have the same name in the same directory. the IDW is open.

 

 

 

 

 

0 Likes
Accepted solutions (1)
3,064 Views
3 Replies
Replies (3)
Message 2 of 4

Anonymous
Not applicable

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?

 

 

0 Likes
Message 3 of 4

Vladimir.Ananyev
Alumni
Alumni
Accepted solution

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)

 Cheers,


Vladimir Ananyev
Developer Technical Services
Autodesk Developer Network

Message 4 of 4

Anonymous
Not applicable

thats it. thank you. that is very useful. also i might add, a little dificult to find anywhere. thanks again.

 

 

0 Likes