cancel
Showing results for
Did you mean:
cancel
Showing results for
Did you mean:

SOLVED
Highlighted
Regular Member

## How can I use greater than/less than symbol in Creo relations?

Hello all,

(Image is attached for clarification)

I am having a problem in using creo relations, I want to display overall dimension of a part in a specific way, that if lets say Length(Lg) is greater than Width(Wi) then it shoudl be display like this in drawing when the dimension display parameter is called; Ti x Wi x Lg and if width is greater than length then; Ti x Lg x Wi. In short greater value should be in the last. For that purpose I am using if statement and applying greater than and less than symbol. Can someone please help me understand what am i doing wrong?

Please refer to the image for clarification.

also please let me know how can i call current date into drawing? and its format too. My parameter defined for date in title block table is &BEARB_DAT, for now I am manually inputting date in the table, but I want to enter it automatically.

Tags (4)
1 ACCEPTED SOLUTION

Accepted Solutions

## Re: How can I use greater than/less than symbol in Creo relations?

Lg = itos(L)
Wi = itos(W)
Ti = itos(T)

IF L >= W
ABMESSUNG = "BI " + Ti + "x" + Wi + "x" + Lg
ELSE
ABMESSUNG = "BI " + Ti + "x" + Lg + "x" + Wi
ENDIF

Keep in mind that the ITOS function automatically rounds fractional values.  If you need to keep the decimal place, see Converting Real Numbers to Strings.

6 REPLIES 6

## Re: How can I use greater than/less than symbol in Creo relations?

These comparison operators do not works for strings.  You need to evaluate them before you use the ITOS function (and convert them to strings.)

Regular Member
(in response to TomU)

## Re: How can I use greater than/less than symbol in Creo relations?

and how to do that? I am sorry i am quite new in relations

## Re: How can I use greater than/less than symbol in Creo relations?

Lg = itos(L)
Wi = itos(W)
Ti = itos(T)

IF L >= W
ABMESSUNG = "BI " + Ti + "x" + Wi + "x" + Lg
ELSE
ABMESSUNG = "BI " + Ti + "x" + Lg + "x" + Wi
ENDIF

Keep in mind that the ITOS function automatically rounds fractional values.  If you need to keep the decimal place, see Converting Real Numbers to Strings.

Regular Member
(in response to TomU)

## Re: How can I use greater than/less than symbol in Creo relations?

ok thanks alot,that seemed to work fine...:)

can u also tel me about the date question i asked at the end?

## Re: How can I use greater than/less than symbol in Creo relations?

Date is trickier.  There is currently no method that will allow you to pull the current date into a parameter in Creo.  There are only three options that I know of:

1. Manually enter the date like you are doing now.  This is the only way to get a static value that is guaranteed to not change.
2. Use &todays_date in a table cell on the drawing format or drawing template.  When the drawing is first created it will automatically resolve to the current date.  Keep in mind that after it's resolved it becomes plain text.  If the format is reapplied and the tables overwritten, this will revaluate again to the current date.
3. If you are using a PDM system like Windchill, there will be system level parameters that you can use to display the date.  The problem with these though is that they will automatically change based on and new revision creation.
Regular Member
(in response to TomU)

## Re: How can I use greater than/less than symbol in Creo relations?

ok that helped alot..thank you so very much Tom...:)

Announcements