Community Tip - Visit the PTCooler (the community lounge) to get to know your fellow community members and check out some of Dale's Friday Humor posts! X
In simple 2-d region, we can select the system defined parameter, say "rpt.index" and so on. My question is when a user wants to set his own parameter, say "code", how can he get the result as he wanted?
Would you kindly help me to check where I am wrong?
First
set a middle parameter-"PR" string
and the target parameter-"code" integrate
and then set the relation in the system
as follow
PR="asm.mbr.name" #transfer the part name to the PR in assmebly drawing#
code=search(PR,"GB") #seperate the standard part which is begin with "GB" from designed part#
IF code==0
code="&rpt.index" #if there are no "GB" in the name, then make the "index" to the code#
ELSE
code=&code #otherwise, user shall input the GB code number#
ENDIF
and in the simple 2-d region, choose the "asm.mbr.user defined"-input "code". but unluckily I cannot get any number show in table column of "code"
# I am intending to change the ballon number which is sequenced from step by sep, and in my compnay internal, we need to make the standard part ballon number input by designer, and that's why I set the "code" parameter. #
thanks!
Hi,
I made a test an here is the result.
x1=search(asm_mbr_name,"A")
if x1==0
x2=rpt_index
else
x2=asm_mbr_mypar
endif
Explanation...
x1=search(asm_mbr_name,"A")
I am searching for "A" in component name (my assembly contains A.prt, B.prt, C.prt, D.prt components)
x2=rpt_index
For B.prt, C.prt, D.prt components I put rpt.index (note that in relations dot is replaced by underscore) into x2 parameter
x2=asm_mbr_mypar
In A.prt I defined parameter named MYPAR. I put its value into x2 parameter
To display x2 parameter in repeat region table, you have to put &rpt.rel.x2 into repeat region cell.
I think you can replace first two relation rows by the following one:
if search(asm_mbr_name,"A")==0
Good luck
Martin Hanak
Hi Martin
thanks for your help!
If Martin's answer solved your issue, please mark it as correct, to signal to other forum users that this question has been answered.
If the issue is not yet solved, let us know how far you got and what is still needed.
P.S. As far as I can see, the key was that your report relations originally used the original dot (or point or period) for separation in the report parameters, while for the relations the dot needs to be replaced by an underscore (asm.mbr.name -> asm_mbr_name)