Skip to main content
16-Pearl
January 14, 2019
Question

Bom Param Substitution

  • January 14, 2019
  • 2 replies
  • 5321 views

Greetings,

 

On Creo 4.0 M020

 

How do I write a relation in a for....?

 

I have an assembly with many parts. Some parts have different parameters than others. The information I need is in the files. Just called something different.

 

For example:

 

123.prt parameter = description_1

 

456.prt parameter = title_1

 

Instead of editing all files. I would like the assembly drawing bom relations to say something like:

 

asm_mbr_description_1 = asm_mbr_title_1.

 

I tried above. It changes the bom. But not the way I hoped for. I reversed it. Not what I wanted either. I basically want it to flag all "description_1"'s and have them show up in my "title_1" repeat region. So - substitution.

 

What is the proper way to write this.

 

Thanks,

 

Wayne

2 replies

23-Emerald IV
January 14, 2019

/* Put this is the repeat region relations.  (You may have to manually add both of these parameter names to the parameters list at the bottom of the relations editor first.)

DESCR = ""

IF EXISTS("asm_mbr_title_1")

    DESCR = asm_mbr_title_1

ELSE

    IF EXISTS("asm_mbr_description_1")

        DESCR = asm_mbr_description_1

    ENDIF

ENDIF

 

Now change the repeat region parameter for that table cell to rpt.rel.DESCR

 

Note:  I haven't actually tested this syntax in Creo, I just typed in directly in this response.  There may be typos...

wfalco16-PearlAuthor
16-Pearl
January 14, 2019

Tom, Not sure I follow:

 

"You may have to manually add both of these parameter names to the parameters list at the bottom of the relations editor first."

 

I did the other steps and I don't think it's complete?

23-Emerald IV
January 14, 2019

If you verify the relations and they gripe, just manually add the parameters first.  I just tested and it didn't gripe, so you should be okay.

 

Repeat Region Relations.png

23-Emerald III
January 14, 2019

Tom's method should do what you need to solve the BOM issue.

 

What you really need to do is fix the start_part.prt template file so it has the proper parameter. Then all future files will have only 1 description parameter. Also educate your users as to which description parameter is the new valid one so they only use that one. If these are older files being saved-as, instruct the users to create the new parameter and cut and paste the old value to the new field, then delete the old parameter.

 

23-Emerald IV
January 14, 2019

I don't use it (yet), but I believe Model/Check can automatically rename these old parameters when it encounters them...

wfalco16-PearlAuthor
16-Pearl
January 14, 2019

Perhaps. We have it. But it may need to be set up for it. I am not that familiar with it. Have not used in some time. thanks again!