Continue to Site

Welcome to MCAD Central

Join our MCAD Central community forums, the largest resource for MCAD (Mechanical Computer-Aided Design) professionals, including files, forums, jobs, articles, calendar, and more.

Table relation to control BOM PN

Tunalover

New member
Folks-
Sorry to ask a stupid question, but can user-defined
model parameters be used in relations? My problem is with handling parts in
a repeat region style BOM having one or more characters that Pro/E
can't handle. For example, many US military standard parts have a
slash ("/") in their part number. Suppose a spring washer has part
number M1213/4C-6 (this may not be a valid part number per the standard
but it works for this example!). How to handle this?

By design
the BOM shows the filename as the part number. For example, an
MS15795-802 flat washer has filename MS15795-802.prt. The BOM reports
the part number by simply dropping the file extension. But what if the
part number were M1213/4C-6. Pro/E can't accept M1213/4C-6.prt as a
filename because of the illegal character "/". In this case we make the
model name M1213_4C-6.prt per our modeling practices.

Each part has a user-defined model
string parameter called MFGR_PN. By default this is a hyphen "-". For
situations where the part number has one or more illegal characters, we
replace the hyphen with the part number e.g. MFGR_PN would be
"M1213/4C-6".

This is what I need to do:

IF MFGR_PN is not equal to "-" THEN
asm_member_name=MFGR_PN
else
asm_member_name=rel_model_name
end if

I think that "rel_model_name" is a system parameter but I'm not positive I have the syntax or spelling right.

Is what I'm trying to do possible? How exactly should the relation look to do this?
TIA
smiley1.gif


PS: To DellBoy on earlier related post-Thanks for the tip. A great suggestion. I will propose this to Mgmt.
 
We do exactly the same but do not have an extra paramter in the part. All we do is simply add a column to the BOM table. Enter text in the repeat region 1st row of the new column for rpt.rel.User Defined (we use DRG as report realtion parameter for part name). Set the text style and then go to Table > Repeat Region > Relations, click on repeat region and type relations as below. Note in the example I change part number laiii_08_02.prt to its correct part number LAIII\08\02


/*sets correct part number


if asm_mbr_name == "laiii_08_02.prt"


then DRG = "LAIII\08\02"


else


DRG = asm_mbr_name


endif





Verify the relation works by clicking the green tick in the relation box, then when you come out of relations, update the table and the new column should replicate the original drawing number column with the new part name instead of the old one. Once it's all correct, click in the original drawing number colum, go to Table > Select Column and delete the original drawing number column.


Stu
 
saspinall-
Your example works for only one part number. We need something that works for ANY part number, not just one that I know about in advance. Since there are literally hundreds of part number in our data management system we can't write hundreds of relations in the table.
 
Tunalover,

work through the reply I gave to Adscott in my other post, the principle is exactly the same as what he wanted. I know the reply I gave him worked because I created an assembly to test it.



DB
 
The simplest solution is to write a relation in your component models:


PART_NUMBER (or whatever parameter name you want) = rel_model_name


for those models where this is not true, simply comment out the relation and set PART_NUMBER equal to the correct value manually.


Then, in your BOM table display asm.mbr.PART_NUMBER instead of asm.mbr.name.


This is what we do here and I believe it is the most common solution to your problem.


Hope this helps,
 
elab-theken-
Your solution is simple and straightforward but requires us to manually address each model (of hundreds of family table members) having a part number containing an offending character. What we really need is a table relation.

The part nos with offending characters now all have a string paramenter MFGR_PN set to the part number. All other part nos have MFGR_PN set to "-". There MUST be a simple IF relation to do this. I suspect that the name MFGR_PN may be problematic because it contains an underscore. Doesn't the underscore have a special functional use in table relations?
 
The _ character is a substitute for the . character but otherwise is can be used in table parameters and model parameters with no problems.

If you still can't work out how to do it, let me know and I will try to find the time to do it and test it.


By the way it is really quite easy to do parameter creation, editting and deletion in the model tree. Particularly useful when you have a lot of parameters in many models to do.


DB
 
Dell_Boy
Thanks for the offer! I have an open case with PTC Tech Support but if history is a guide that won't go anywhere. I'lllet you know then.
 
Tunalover

try

IF asm_mbr_mfgr_pn<>"-"
asm_member_name = asm_mbr_mfgr_pn
ELSE
asm_member_name = asm_mbr_name
ENDIF

View attachment 2565

Ihave proven to myselfthat this works but I would still recommend that you have mfgr_pnALWAYS be representative of the part number.

Phase out the old method, updateexisting models where possibleand embed the part number re-assignment relation in your start models if necessary.


DB

Edited by: Dell_Boy
 
Dell_Boy:
I tried your IF statement and Pro/E choked on the first line:
IF asm_mbr_mfgr_pn<>"-"

It says it doesn't recognize the mfgr_pn string parameter. The handling of parameters seems a bit confusing. There are model parameters, drawing parameters, and table parameters. Do any user-defined model parameters (e.g. mfgr_pn) have to be added to the table parameters?

It looks like the IF statement has no space between mfgr_pn and <>. Is that right? Also, the quotation mark, is that a double quote (as it appears here ") or a single quote (').

Could we write the IF statement with periods instead of underscores:
IF asm.mbr.mfgr_pn<>"-"

What version and build of Pro/E are you working with?

Is there a good solid reference somewhere that has lots of examples of table relations?

Sorry to be a pain but I'm the only guy who is stepping forward at our company to develope a robust BOM table and we badly need it.
 
Tunalover,

assuming that your components do contain a model (not feature) parameter called mfgr_pn I can only assume that it doesn't exist in the table parameters yet. The simplest way to do this is to add it's column to the table. After everything is working you can safely delete the column again.

You will have to create a table parameter called asm_member_name

The IF statement was copied and pasted directly from the working table relations

DO NOT put periods in your table relations.

I haven't found any good reference info. I recommend putting in additional table columns to sort of display intermediate steps in getting the final desired result.


Check your PM box for the files created in 2001 to maximise the chances of you being able to read them. Ideally you should just be able to retrieve my saved table into your drawing and it should work. From there you should be able to copy the relevant information into your own tables.



DB


Edited by: Dell_Boy
 

Sponsor

Back
Top