cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
Showing results for 
Search instead for 
Did you mean: 

Community Tip - Did you get an answer that solved your problem? Please mark it as an Accepted Solution so others with the same problem can find the answer easily. X

Relation definition in drawing

ptc-4730420
1-Visitor

Relation definition in drawing

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!


This thread is inactive and closed by the PTC Community Management Team. If you would like to provide a reply and re-open this thread, please notify the moderator and reference the thread. You may also use "Start a topic" button to ask a new question. Please be sure to include what version of the PTC product you are using so another community member knowledgeable about your version may be able to assist.
3 REPLIES 3

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


Martin Hanák

Hi Martin

thanks for your help!

gkoch
12-Amethyst
(To:ptc-4730420)

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)

Announcements
NEW Creo+ Topics: Real-time Collaboration


Top Tags