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

I think the best way to do this is by adding 2 dummy parameters. (InnerDiameter and WallThickness) A dummy parameter for InnerDiameter is maybe not what you expect. But you need it to see if the InnerDiameter or the WallThickness has been changed. As an example, I used a tube. In the screencast below you will see all parameters that i used.

ChangeBoth.gif

And this is the iLogic code to make it work:

Dim wt As Double = WallThickness
Dim id As Double = InnerDiameter
Dim idr As Double = Parameter("InnerDiameterReal")
Dim odr As Double = Parameter("OuterDiameterReal")

If (DoubleUtil.DoublesAreEqual(id, idr)) Then
	' wall thickness has been changed
	Parameter("InnerDiameterReal") = odr - 2 * wt
	Parameter("InnerDiameter") = odr - 2*wt
	Parameter("WallThickness") = wt	
Else
	' inner diameter has been changed
	Parameter("WallThickness") = (odr - id)/2
	Parameter("InnerDiameterReal") = id
	
End If

Jelte de Jong
Did you find this post helpful? Feel free to Like this post.
Did your question get successfully answered? Then click on the ACCEPT SOLUTION button.

EESignature


Blog: hjalte.nl - github.com