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

Minimum Thickness script

tommasobriguglio
Explorer

Minimum Thickness script

tommasobriguglio
Explorer
Explorer

Hi everyone, I am new to this but...

I am trying to create a script that control the thickness of a part, and if is less than 3mm, so it will change it to 3mm. 

It should be something like:

 

If thickness < 3mm

Thickness=3mm

 

Can anyone help me? 

Thank you so much for your time

Thomas 

 

0 Likes
Reply
290 Views
3 Replies
Replies (3)

WCrihfield
Mentor
Mentor

Hi @tommasobriguglio.  I am not sure we have enough details to be able to create a custom working solution for you.

If your part document contains a parameter named "Thickness", and that parameter is controlling the thickness of your part, does it contain an equation, or is it just a simple numerical expression?  If it currently contains an equation, then setting its value to a simple numerical value within the iLogic rule may break its functionality.  If it contains an equation, you may have to either modify its equation, or modify another parameter's value that is being used as part of the equation.

However, if that parameter exists, and is in control of the part's thickness, and just contains a simple numerical value, then something simple very similar to what you posted above should work.

 

If Thickness < 3mm Then
	Thickness = 3mm
End If

 

If this does not work, then could you maybe post the part document here, so that we could get a better understanding of the situation.  If you do post a part, make sure you remove any personal or proprietary information from it first.

Wesley Crihfield

EESignature

(Not an Autodesk Employee)

tommasobriguglio
Explorer
Explorer

Hi @WCrihfield  and thanks for your answer!
The equation i am using now is  

A = T * 0.2

 

A is actually the value that has to be > 0.3

I couldnt use expressions in formula , nor even the > symbol. So i discovered iLogic. But it's a little complicated to understand ! What should i do?
Thanks

 

0 Likes

WCrihfield
Mentor
Mentor

OK.  So if you are using that equation within an iLogic rule, I assume then that both 'A' and 'T' represent parameters within the document.  If that is not the case, then let me know what 'A' represents.  And I assume that when you look at the equation area of the parameter named 'A' within the Parameters dialog box, it does not currently contain any equation, just a simple numerical value.  If so, then something like this should work within that iLogic rule:

A = T * 2
If A > 0.3 mm Then
	A = 0.3 mm
End If

Wesley Crihfield

EESignature

(Not an Autodesk Employee)

0 Likes