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

iLogic Question:

 

I would also like to set a variable to equal "--" under some conditions.

 

Of course, it is currently a Number parameter and I would need a String Parameter to get it to output "--"

 

I know in C++ there is a syntax that can temporarily change a variable to a string, how about Inventor?

 

Here is the most pertinent part of the code:

 

SyntaxEditor Code Snippet

If ThirdDist > 1 Then
inc = .5 ' rounding increment ( .125, .25, .5, etc)
X = Round(Round(L-G_,4) / inc) * inc
Y= Round(Round(L-F_-X,4) / inc) * inc
Z= Round(Round(L-E_-X-Y,4) / inc) * inc
Else 
X = "--"
Y = "--"
Z = "--"
End If