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

Community Tip - You can subscribe to a forum, label or individual post and receive email notifications when someone posts a new topic or reply. Learn more! X

Translate the entire conversation x

Do we have a good documentation for using relation as used in repeat region?

AK_10981268
4-Participant

Do we have a good documentation for using relation as used in repeat region?

As the title says. I want to learn all the functions available to be used in repeat region filter and relation. The documentation here is very limited https://support.ptc.com/help/creo/creo_pma/r12/usascii/index.html#page/detail/About_Writing_Relations.html#
Arguable it's just the introduction to what the relation does. But does not give full details of what all functions are available. I've seen in my company people using much more advance relations to filter items in repeat region. 

I took the Creo authorized course some days back but sadly the instructor kept it just on high level and struggled to provide solutions for complex filters.
How can I learn more on this, something that is comprehensive and all inclusive.

3 REPLIES 3

While not all documented, Here are functions and a bit of syntax. 

Trigonometry (degrees, not radians)
SIN(x) COS(x) TAN(x)
ASIN(x) ACOS(x) ATAN(x)
ATAN2(y,x)

 

Power & Roots
SQRT(x)
POW(x,y)
EXP(x)
LN(x)
LOG(x)

 

Absolute & Sign
ABS(x)
SIGN(x)

 

Rounding & Integers
INT(x) /* truncate */
FLOOR(x)
CEIL(x)
ROUND(x)

 

Min / Max
MIN(a,b)
MAX(a,b)

 

IF statement
IF(condition, value_if_true, value_if_false)


AND OR NOT Comparison operators

==

!=

<

<=

>

>=

 

String Functions
STRLEN("text")
SUBSTRING("text", start, length)
STRCMP("A","B")
STRCAT("A","B")
STRFIND("text","sub")
STRUPPER("text")
STRLOWER("TEXT")
STRTRIM(" text ")

 

Units & Conversion
UNIT(value, "mm")
UNIT(value, "in")
TO_NUMBER("12.5")
TO_STRING(25)

 

Model / System Functions
EXISTS(parameter_or_dimension) GETENV("ENV_VAR")

 

Tables (Family Tables / Relations Tables)
LOOKUP(x, table)
LOOKUP_EXACT(x, table)
LOOKUP_INTERPOLATE(x, table)

 

Pattern & Family Table Keywords
INDEX /* pattern index */
MEMB_V /* family table value */

MEMB_I /* family table index */

 

Boolean Constants
YES NO
TRUE FALSE

 

Syntax Examples

 

Dimension control

d10 = d5 * 2

 

Conditional logic

d20 = IF(d5 > 100, 150, 75)


Unit-safe relation

d3 = UNIT(2.5, "in")

 

String parameter

DESC = STRCAT("LEN=", TO_STRING(d10))

 

Common Pitfalls
• Angles are degrees, not radians
• Units must be compatible (or explicitly converted)
• No circular dependencies
• String comparisons are case-sensitive

 

Tips
• Use EXISTS() to prevent regeneration failures
• Normalize strings with STRUPPER() before comparison
• Prefer LOOKUP_EXACT() for deterministic table behavior

 

 

Could you post a specific situation or a question posed to the instructor? It would be helpful and very educative for us too.

---
Regards
Srinivasan Iyer

Hello @AK_10981268

 

It looks like you have some responses from some community experts. If it helped you solve your question please mark the reply as the Accepted Solution. 

Of course, if you have more to share on your issue, please let the Community know so other community members can continue to help you.

Thanks,
Vivek N.
Community Moderation Team.

Announcements
NEW Creo+ Topics: Real-time Collaboration

Top Tags