Announcements
Attention for Customers without Multi-Factor Authentication or Single Sign-On - OTP Verification rolls out April 2025. Read all about it here.
J.VandeMerckt
688 Views, 16 Replies

Save part and use selected case and length as extension

Hi Forum

 

I have a part file where I can change the length of a part.
The part also has a simple iLogic code with different cases. The cases select what extrusions should be active or suppressed.

I want to make a Form where I choose the length and Case.
Then be able to press save (save as), The length and selected case should be used as a extensions behind the original file name.

 

 

I don't think this should be a complicated code but I'm very new to Ilogic.

 

This is the code I use to Select the case:

	        Feature.IsActive("Ø200 CONT") = False
			Feature.IsActive("Ø200 DOWN") = False
			Feature.IsActive("Ø200 UP") = False
			Feature.IsActive("Ø250 CONT") = False
			Feature.IsActive("Ø250 DOWN") = False
			Feature.IsActive("Ø250 UP") = False
			
			
			Select Case FixedUnit_Curve
	
        Case "Ø200 CONT"
            Feature.IsActive("Ø200 CONT") = True

        Case "Ø200 DOWN"
			Feature.IsActive("Ø200 DOWN") = True
			
        Case "Ø200 UP"
			Feature.IsActive("Ø200 UP") = True
			
        Case "Ø250 CONT"
			Feature.IsActive("Ø250 CONT") = True
			
        Case "Ø250 DOWN"
			Feature.IsActive("Ø250 DOWN") = True
			
        Case "Ø250 UP"
			Feature.IsActive("Ø250 UP") = True
			
		End Select
		iLogicVb.UpdateWhenDone = True

I use this code to open the form when opening the file.

iLogicForm.Show("Fixed Unit Curve and Length")

Let me know if you guys need anymore info!

Thanks :slightly_smiling_face: