Community Tip - New to the community? Learn how to post a question and get help from PTC and industry experts! X
Hello, I have an assembly that uses various lengths of raw materials. To indicate this, we list the raw material and what length to cut it at. We currently have it set up so there is a special "CUT_LENGTH" parameter controlling this length for use with pre-defined flexibility and easy identification of the driving parameters. We want to add this parameter to the CONFIG.PRO file so we don't have to manually add this parameter in every time. When doing so, it defaults to a "0" when not being used (which is ok) but it shows this in the custom BOM, so we end up having to delete the parameter per each item. Instead of having to delete said parameter, we would like to have it controlled by a relation that basically says "If the cut length is equal to 0, replace the value in the BOM with a blank, but leave all other cells alone." I can get it to edit all of the cells where the "CUT_LENGTH" parameter is shown at once with no issue. But when I try to specify which ones to change/leave alone, Creo blanks out all of the information to the left side of the cell. I am not sure if I am missing something or this can't be done etc.? Any help would be greatly appreciated.
Starting point of table:
Driving symbols of table:
Table & Relations when Controlling all instances of "cut_length":
Table & Relations when trying to control specific instances of "cut_length":
Solved! Go to Solution.
Hi,
some comments follow ...
asm_mbr_cut_length in repeat relations
Relations (I guess CUT_LENGTH parameter type is Real Number):
rel_cut_length=" "
IF EXISTS ("asm_mbr_cut_length")
IF asm_mbr_cut_length > 0
rel_cut_length=asm_mbr_cut_length
endif
endif
Table cell contents ... &rpt.rel.rel_cut_length
You need to change the relation name in the table to a User Defined name and use that name in the relation.
e.g. asm_mbr_cut_length_tbl
IF EXISTS ("asm_mbr_cut_length")
IF asm_mbr_cut_length=="0.00"
asm_mbr_cut_length_tbl=" "
else
asm_mbr_cut_length_tbl = asm_mbr_cut_length
ENDIF
ENDIF
kdirth,
I tried doing what you had said, and now it is deleting both rows entirely.
Is your parameter "cut_length" in the parts? If so, remove "ASM_MBR_" from the name in the relation.
kdirth, I finally got it to work with a combination of what you had replied and MartinHank had said. Thank you for your help!
@JS_12786992 . if you can, add your final solution to this topic to help anyone that has a similar issue and finds this post.
I think I have it like this to cover cases where the parameter doesnt even exist.(We have several start models over the years and the params doesnt even existed before). Should work for you so it doesnt automatically put in 0.00
IF EXISTS ("asm_mbr_cut_length")
asm_mbr_cut_length_tbl = asm_mbr_cut_length
IF asm_mbr_cut_length=="0.00"
asm_mbr_cut_length_tbl=" "
ENDIF
else
asm_mbr_cut_length_tbl=" "
ENDIF
Hi,
some comments follow ...
asm_mbr_cut_length in repeat relations
Relations (I guess CUT_LENGTH parameter type is Real Number):
rel_cut_length=" "
IF EXISTS ("asm_mbr_cut_length")
IF asm_mbr_cut_length > 0
rel_cut_length=asm_mbr_cut_length
endif
endif
Table cell contents ... &rpt.rel.rel_cut_length
MartinHanak, I finally got it to work. with a combination of what you had replied and kdirth had said. Thank you for your help!