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.

Register Log in

Family Table 2D repeat region relations

ProFerg

New member
I need to create a 2D repeat region table to pull in a family table. Each instance name is a 10 digit number. (e.g. 1230123400) I want to replace the first0 with a - and remove the last two 0's so the instance name in this case is displayed as 123-1234. The first 0 is always a 0 and the last two digits are also always 0. Can someone help with a relation? I dont want to create a seperate column in the table and I need the 10 digit instance names.
 

derekh001

New member
I had a similar problem. Your's is pretty messy though. You need to use"extract" and string concatenation function in a relation. Since the number is going to be different than the instance name, you need three new parameters to assign thetext in chunks, 123-1234. You don't need to include this in the table, since the unique instance names will evaluate the relation for you.


digit1 = extract (rel_model_name (),1,3) + "-"
digit2 = extract (rel_model_name (),5,4)
digit3 = digit1 + digit2


The first line extracts three characters from the model name, starting with the first character, not the number "1". and adds the dash to it, so digit1 = 123-.


second line extracts four characters from the model name, starting with the fifth character. so digit2 = 1234


Third line obviously just puts the two together, so digit3 = 123-1234


You can also use "search" to find specific text occurences,if the text you're searching is always the same, but maybe in a different location.


digit1 = search(rel_model_name (), "0"), this evaluates to 4, since the first 0 is the fourth character in.
 

ProFerg

New member
I then just add digit3 to the table? Also, where do I find more information on the functions available for use in relations?


Thank you very much!
 

derekh001

New member
Actually, yes, you needdigit3 in the table if you want to display it, butdon't put any values, just the *. The relations will evaluate each instance. There's a ton of stuff in Pro/E help. If the "Contents and Index" command doesn't work from your Pro/E Help menu, (mine doesn't) you should have the html pages in your Pro/E loadpoint.


C:\Program Files\proe2001\html\usascii\proe\master.htm


Try mcadcentral.com also.
 

Sponsor

Top