ilogicVb. Runrule

ilogicVb. Runrule

karram
Advocate Advocate
339 Views
1 Reply
Message 1 of 2

ilogicVb. Runrule

karram
Advocate
Advocate

Hello,

 

Currently, I have a main assembly with 50 parts. Each part contains a suppression rule. In the main assembly, I used the below iLogic rules to process all 50 parts, which takes more time. Are there any alternative ilogic rules available to speed up the process, such as a common rule? For Example, when I update my main rule to change a user parameter, is there a way to automatically activate all corresponding suppression rules for all parts?"

 

Current code like below in my main assembly

iLogicVb.RunRule("Part1:1", "Supp")
iLogicVb.RunRule("Part2:1", "Supp")
iLogicVb.RunRule("Part3:1", "Supp")
...
...
...
iLogicVb.RunRule("Part50:1", "Supp")

0 Likes
340 Views
1 Reply
Reply (1)
Message 2 of 2

Curtis_Waguespack
Consultant
Consultant

Hi @karram 

 

What does the code in the part files do?

 

Most likely you can move that code up to an assembly rule and run it on each occurrence, and eliminate the need to run rules down at the part level.

 

For example if the rule were suppressing a hole in the parts, you could have something like this at the assembly level to do the same thing

 

Dim oDoc As AssemblyDocument = ThisDoc.Document
For Each oOcc In oDoc.ComponentDefinition.Occurrences
	Try
		Feature.IsActive(oOcc.name, "Hole2") = False
	Catch ex As Exception
		Logger.Error(ex.Message)
	End Try
Next

 

I hope this helps.
Best of luck to you in all of your Inventor pursuits,
Curtis
http://inventortrenches.blogspot.com

EESignature

0 Likes