iLogic execute rule in part from assemblie

iLogic execute rule in part from assemblie

fabiorcferreira
Contributor Contributor
529 Views
1 Reply
Message 1 of 2

iLogic execute rule in part from assemblie

fabiorcferreira
Contributor
Contributor

On my company we often extract faces from sheet metals. So i developed a rule that when activated in a assembly with a part selected would open it and make it invisible in the assembly. I got that code working. But i also have a rule to make us select a face (in the part) and automatically extract it with the correct file name. I would like to activate that rule from within the first one. 


The problem is that if i use the second rule as external and activate it using iLogicVb.RunExternalRule("ruleFileName") it doesn't detect the new opened part as the one it should be used in.

 

If i make it as a "Internal" rule to the document, i can't get the document name from within the assembly ( i mean the document name and the ":1" part)

 

Does any of you know a "fix" for these problems?

 

ps: if needed i can provide the code for both rules

0 Likes
Accepted solutions (1)
530 Views
1 Reply
Reply (1)
Message 2 of 2

fabiorcferreira
Contributor
Contributor
Accepted solution

i found a solution. i had to use 

Dim oOccurrence As ComponentOccurrence
    Dim oName As String
    oName = oOccurrence.Name

 

0 Likes