Repeat regions and dimensions
Hello,
I'm running into some issues trying to pull part dims into a repeat region. I'm working towards having as much info automatically pulled into the to remove any user error from manually typing information and dimensions.
When I click into the repeat region and select asm->mbr->D1, it correctly pulls that info. The same is true for D2.
I wrote the following relation (with some help from other posts regarding real numbers to string conversion) to put these dims into a string so it shows "Length X Width":
IF ASM_MBR_D1 > ASM_MBR_D2
LENGTH = ASM_MBR_D1
WIDTH = ASM_MBR_D2
IF ASM_MBR_D1 < ASM_MBR_D2
LENGTH = ASM_MBR_D2
WIDTH = ASM_MBR_D1
ENDIF
ENDIF
/* CONVERT LENGTH REAL NUMBER TO STRING WITH 2 DECIMALS
LENGTH_STR = ITOS(FLOOR(LENGTH+.0005))+"."+\
EXTRACT(ITOS(((FLOOR((LENGTH+.0005),2))\
-FLOOR(FLOOR((LENGTH+.0005),2))+1)*1000),2,2)
WIDTH_STR =ITOS(FLOOR(WIDTH+.0005))+"."+\
EXTRACT(ITOS(((FLOOR((WIDTH+.0005),2))\
-FLOOR(FLOOR((WIDTH+.0005),2))+1)*1000),2,2)
/* LIST DIMENSIONS IN ONE STRING
part_dimensions = LENGTH_STR+" X "+WIDTH_STR
The result is ".00 X .00". For some reason, I can't get it to grab those D1, D2 dims when I use them in a relation. Do I need to use the specific part dims sd0, sd1? If that's the case, can someone help me with syntax, I'm not sure how to call those in a relation.
Any thoughts? Any and all help is greatly appreciated! I'm pullin my hair out trying to get this to work...

