Skip to main content
1-Visitor
July 17, 2018
Solved

Relation in pattern to increment value for every instance

  • July 17, 2018
  • 1 reply
  • 8949 views

hello

 

i have been using dimension pattern, where in, i have given the increment value for center to center distance as 4. 

i need the distance to keep reducing by 0.1 for every instance , like 

c-c for my first instance is 4 , 2nd should be 3.9 , 3rd is 3.8 .. and so on .. 

how can i achieve this using relation ... 

 

is there any command like "do while", "for" that can be used in creo ... 

Thanks in advance. 

Best answer by Kevin

One way is to set up an equation for the memb_i value.

 

memb_i = di - 0.1*idx1

1 reply

24-Ruby III
July 17, 2018

Hi,

edit pattern definition and set relations. See following picture taken from CR2.

pattern.png

vdevan1-VisitorAuthor
1-Visitor
July 17, 2018

Hey Martin, 

Thank you for those pics.

I have found out that option to go to relation.

I am not able to successfully create a relation with those variables.

The logic is pretty simple, can do it with a do while command.. 

but i do not know how to establish a realiton in here (creo)... and am not well aware of the syntax... 

can you help me with some examples ...?

KenFarley
21-Topaz II
July 17, 2018

Unfortunately, there is no looping construct available in Creo relations. Do while, for, repeat until are all not implemented. All you have is if-else-endif constructs. The evaluation of relations is done in a sort of single pass way. It parses through them in order and does the calculations you need. I have if-else-else-...endif logical constructs that would be graded very poorly in a class with a more powerful language.