Hi everybody,
There is an assembly with a Rule A (internal rule) in iLogic and a subassembly with a Rule B (internal rule) in the same file.
When I run the rule in assembly (Rule A), the rule in subassembly will not be run so I have to go to the subassembly and run Rule B too.
Is there any way to run AND update all the internal rules in the same file? (including rules in parts or subassemblies)
Thanks
Solved! Go to Solution.
Solved by Sergio.D.Suárez. Go to Solution.
Hi, with this rule you will then execute each internal rule of all the reference files called "RuleB".
This rule is executed in your master assembly. It is an example that I think could serve to improve your code in your main assembly.
Dim oDoc As AssemblyDocument = ThisDoc.Document 'define the ilogicAutomation Dim iLogicAuto As Object iLogicAuto = iLogicVb.Automation Dim oRuleName As String = "RuleB" Dim oRule As Object For Each doc As Document In oDoc.AllReferencedDocuments On Error Resume Next oRule = iLogicAuto.GetRule(doc, oRuleName) 'run the rule iLogicAuto.RunRuleDirect(oRule) Next
I hope this helps solve your problem. regards
Sergio Daniel Suarez
Mechanical Designer
| Upwork Profile | LinkedIn
Cant seem to get it to work. I have a form and a rule with same name in a sub assembly as the main. I have to open the sub every time I change the true false and run it in the sub. I just hides a version of the same part.. I want the rule to run in the sub assembly and event trigger is set when i properties change . Inveto2021
I am trying to run it nothing seems to happen . I am trying to get a rule in a sub assembly to fire when i change a true false in my Form.
see answer to your duplicate question here:
This works great!
@Sergio.D.Suárez how would you code this to change multiple rules?
I assume you could just use the same piece of code but with a differend rule name
hi, this code doesn't seem to work when the rule you're trying to update is located in a drawing.
is there a way to modify it so it does work with drawings?
Can't find what you're looking for? Ask the community or share your knowledge.