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

Hi insomnix,

 

I realise this is an old post, but thought I'd post here before starting a new one.

 

I've used Inventor for a while, but am new to ilogic and would like to find a neat way of suppressing/unsuppressing the constraints specific to a particular component within my assembly if it is supressed/unsupressed. Below is the code in which I control the suppression state of the related constraints explicitly. There aren't that many constraints so I can punch out the code for teh whole assembly relatively easily, but it would be great if there was a short-ish piece of code that could cycle through and do the job so that if the constraints are changed in the future or names of constraints edited then the iLogic rule wouldn't need to be updated with the same.

 

I looked through your code, but with my limited experience didn't understand how I would use it in my rule below specific to the component "FLANGE_TOP_#3:1" for example?

 

If TF_LENGTH_3 = 0 Then
	Component.IsActive("FLANGE_TOP_#3:1") = False
	Constraint.IsActive("Flush:FRONT_TF3") = False
	Constraint.IsActive("Mate:TF3_WEB") = False
	Constraint.IsActive("Mate:END_TF2_TF3") = False
	Constraint.IsActive("Mate:END_TF3_TF4") = False
		
ElseIf TF_LENGTH_3 > 0 And TF_LENGTH_4 = 0 Then
	Component.IsActive("FLANGE_TOP_#3:1") = True
	Constraint.IsActive("Flush:FRONT_TF3") = True
	Constraint.IsActive("Mate:TF3_WEB") = True
	Constraint.IsActive("Mate:END_TF2_TF3") = True
	Constraint.IsActive("Mate:END_TF3_TF4") = True
End If

 

Kind regards.

 

Inventor 2021

Windows 10