Announcements
Attention for Customers without Multi-Factor Authentication or Single Sign-On - OTP Verification rolls out April 2025. Read all about it here.
Curtis_Waguespack
in reply to: karram

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