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

Community Tip - Did you know you can set a signature that will be added to all your posts? Set it here! X

Translate the entire conversation x

How to reference drawing info in repeat region relations?

JamesAvis
14-Alexandrite

How to reference drawing info in repeat region relations?

PTC says this can't be done, so I'm appealing to a higher authority.

 

Put simply, I want to use repeat region relations to compare a parameter in each member to the number of the drawing. PTC Tech Support says there isn't any way to reference information about the drawing from within the repeat region, but that sounds like a terrible gap in functionality, is it really true?

ACCEPTED SOLUTION

Accepted Solutions
JamesAvis
14-Alexandrite
(To:JamesAvis)

Even better, I found that PTC Tech Support is wrong, and you CAN reference the drawing information!

drawing_number=rel_model_name

rel_model_name returns the drawing file name without the file extension, which is exactly what I wanted in the first place.

 

You might think, from the name and from the article describing it in the knowledge center, that it is the name of the top model, but it is not. In test drawing DRW0003.drw, rel_model_name returns DRW0003.

View solution in original post

3 REPLIES 3
StephenW
23-Emerald III
(To:JamesAvis)

It would likely be helpful if you included a more specific example.

In general, the repeat region is driven from model information and doesn't really get info from the drawing, 

JamesAvis
14-Alexandrite
(To:StephenW)

I found an acceptable workaround for us, getting the information from the top model, but it would be better to get it from the drawing.


In a simple case, where the assembly and drawing numbers match:

drawing_number=asm_name

 

In our case, there is a suffix on the assembly, always 4 characters long, so

drawing_number=EXTRACT(asm_name, 1, STRING_LENGTH(asm_name) - 4)

 

It works, and I can add logic to protect against some fringe cases. I've posted a product idea to allow referencing drawing parameters: https://community.ptc.com/t5/Creo-Parametric-Ideas/Reference-drawing-parameters-in-repeat-region-relations/idi-p/1042007

JamesAvis
14-Alexandrite
(To:JamesAvis)

Even better, I found that PTC Tech Support is wrong, and you CAN reference the drawing information!

drawing_number=rel_model_name

rel_model_name returns the drawing file name without the file extension, which is exactly what I wanted in the first place.

 

You might think, from the name and from the article describing it in the knowledge center, that it is the name of the top model, but it is not. In test drawing DRW0003.drw, rel_model_name returns DRW0003.

Announcements
NEW Creo+ Topics: Real-time Collaboration

Top Tags