Set custom Index values in repeat Region
Set custom Index values in repeat Region
(OP)
Good morning,
I'm wondering if there is a way to set custom values for the Index numbers in a repeat region? As it sits, Index value starts at 1, 2, 3 etc. Can I set it to 001,002,003 etc?
Thanks for your help!
I'm wondering if there is a way to set custom values for the Index numbers in a repeat region? As it sits, Index value starts at 1, 2, 3 etc. Can I set it to 001,002,003 etc?
Thanks for your help!
RE: Set custom Index values in repeat Region
RE: Set custom Index values in repeat Region
RE: Set custom Index values in repeat Region
"Wildfires are dangerous, hard to control, and economically catastrophic."
Ben Loosli
RE: Set custom Index values in repeat Region
RE: Set custom Index values in repeat Region
Start at https://support.ptc.com/help/creo/creo_pma/r7.0/us...
Note the "rpt.index" which is the name of the repeat region index. This is a defined item that internally numbers each line of the repeat region.
Then look at https://support.ptc.com/help/creo/creo_pma/r7.0/us... which is where relations are added. You'll need to read the section on relations. PTC provides an example: https://support.ptc.com/help/creo/creo_pma/r7.0/us...
Notice the menu sequence "rpt > rel > User Defined" to create your new parameter.
An example of using relations:
I doubt the ptc community link works. PTC breaks their user community forum too often.
The following operators and functions are supported for strings:
== Compares strings as equal.
!=, <>, ~= Compares strings as unequal.
+ Concatenates strings.
string_length(parameter name) returns the length in characters of the string contained by parameter name
itos(int) Converts integers to strings. Here, int can be a number or an expression. Non-integers are rounded off.
search(string, substring) Searches for substrings. The resulting value is the position of the substring in the string (0 if not found).
extract(string, position, length) Extracts pieces of strings.
Probable error in function evaluation - This message is given when the EXTRACT function is used in Relations when the parameter length is greater as the parameter name to be extracted.
For example:
If param = "abcdef", then:
flag = param == "abcdef"—returns TRUE
flag = abcdef != "ghi"—returns TRUE
new = param + "ghi"—new is abcdefghi
new = itos(10 + 7)—new is 17
new = param + itos(1.5)—new is abcdef2
where = search(param, "bcd")—where is 2
where = search(param, "bce")—where is 0
new = extract(param,2,3)—new is bcd
Note: If you use the itos function on a parameter whose value is zero (0), the return value is an empty string.
The following examples illustrate the itos function:
Finally, see https://support.ptc.com/help/creo/creo_pma/r7.0/us... for information on changing the index value that balloons use.
RE: Set custom Index values in repeat Region