Community Tip - You can Bookmark boards, posts or articles that you'd like to access again easily! X
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?
Solved! Go to Solution.
Even better, I found that PTC Tech Support is wrong, and you CAN reference the drawing information!
drawing_number=rel_model_namerel_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.
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,
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
Even better, I found that PTC Tech Support is wrong, and you CAN reference the drawing information!
drawing_number=rel_model_namerel_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.
