×
INTELLIGENT WORK FORUMS
FOR ENGINEERING PROFESSIONALS

Log In

Come Join Us!

Are you an
Engineering professional?
Join Eng-Tips Forums!
  • Talk With Other Members
  • Be Notified Of Responses
    To Your Posts
  • Keyword Search
  • One-Click Access To Your
    Favorite Forums
  • Automated Signatures
    On Your Posts
  • Best Of All, It's Free!
  • Students Click Here

*Eng-Tips's functionality depends on members receiving e-mail. By joining you are opting in to receive e-mail.

Posting Guidelines

Promoting, selling, recruiting, coursework and thesis posting is forbidden.

Students Click Here

Jobs

Truncating Parameter names for repeat region

Truncating Parameter names for repeat region

Truncating Parameter names for repeat region

(OP)
Hi All,

I'm trying to truncate the model names in the repeat region of the parts list.
Ex.

asm_mbr_name = 1234-123456_description
asm_mbr_name = 123456_description
asm_mbr_name = 12abc_description_desc2


what I want in the assembly drawing bom is:

1234-123456
123456
12abc

any help would be greatly appreciated.

RE: Truncating Parameter names for repeat region

Hi,

I see that you want to eliminate all charachters after "_" for all your parts. Follow me:

In each part, cretate a new parameter "model_name" and add the following relation:

model_name = extract(rel_model_name,1, (search(rel_model_name, "_")-1))

Then in BOM replace &ASM.MBR.NAME with &ASM.MBR.MODEL_NAME

PRO/E will display in the BOM table the names you desire.

Good luck.

-Hora

RE: Truncating Parameter names for repeat region

(OP)
Hi Hora,

Thanks for the info. I tried something similar to this but slightly different.
However, I'm trying to do this at the assembly drawing level but within the repeat relations. There are tens of thousands of parts that currently exist within the database. I don't have the rights or privileges to change these parts. Many different engineers and designers over the years have named their parts differently and with different parameters.

So with that said, is there any way of getting the assembly BOM to truncate the assembly member name?

I could use the following:

if asm_mbr_name=="12345_ABCDE"
asm_mbr_part_number="12345"
else
asm_mbr_part_number=asm_mbr_name
endif

I just don't want to have to do this for every part in the BOM. I have tried:
asm_mbr_part_number = extract(asm_mbr_name,1, (search(asm_mbr_name, "_")-1))
And I get the good old: /* ERROR: Relation has an error.

There has to be a way.

Thanks again.

RE: Truncating Parameter names for repeat region

I did a half of your problem. I was able to list in BOM the a string of characters representing a part number like "12345". Unfortunately, Pro/E cannot apply "search" function on ASM_MBR_NAME, so you cannot detect automatic the first "_" character (that was the clue of the problem). Probably because ASM_MBR_NAME is a type of wide string? I have no ideea at this moment. I will search other work-arrounds and if I'll find the solution I will summit it.

-Hora

RE: Truncating Parameter names for repeat region

You should apply a similar relation to the BoM table in the drawing, and not the assembly. This way, when the table is made, you dont need to stick this relation in every part, just the table cells.

http://www.3dlogix.com

RE: Truncating Parameter names for repeat region

Hi Steve,

The problem is that when you apply my relation to the BOM repeat region in this way (of course, putting the &rpt.rel.bom_name in repeat region cell instead of &asm.mbr.name):

BOM_NAME = extract(asm_mbr_name,1, (search(asm_mbr_name, "_")-1))

the program returns an error message. The error comes from this portion of the relation:

....search(asm_mbr_name, "_")

The return of the search function is a real number and it takes two strings as input. But I think that "asm_mbr_name" is not a string. Probably is a wide string and we have no function to convert it to a "normal" string outside Pro/Toolkit. I'm not sure, but for the moment I cannot see what is wrong.

-Hora.

Red Flag This Post

Please let us know here why this post is inappropriate. Reasons such as off-topic, duplicates, flames, illegal, vulgar, or students posting their homework.

Red Flag Submitted

Thank you for helping keep Eng-Tips Forums free from inappropriate posts.
The Eng-Tips staff will check this out and take appropriate action.

Reply To This Thread

Posting in the Eng-Tips forums is a member-only feature.

Click Here to join Eng-Tips and talk with other members!


Resources