cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
Showing results for 
Search instead for 
Did you mean: 

Community Tip - Want the oppurtunity to discuss enhancements to PTC products? Join a working group! X

relating a manual input in a region

RL_10410177
3-Visitor

relating a manual input in a region

I am using Creo Parametric Release 4.0 and DatecodeF000

I'm trying to make a .frm to use as a base sheet for multiple drawings. There is a section where some data will be manually input like height, weight, and length, and I'm trying to find a way to make other squares on the table auto spit out the metric version of the input data.
For instance, I would manually input 50 (in) into the length and the table auto fills the square next to it with 1270 (mm).
Alternatively, if set up parameters so the table would grab the weight (lbs) and then auto calculate the weight (kgs).
I get that I need to use relations to do this but I'm unclear on how to do the relation.
Thanks in advance.

1 ACCEPTED SOLUTION

Accepted Solutions
TomU
23-Emerald IV
(To:RL_10410177)

You're options are a little limited with Creo 4.0.  There are some extra repeat region parameters that have been added to newer versions of Creo that make referring to the parent model easier.  Regardless, here's how to do this:

 

Table Cell:  &mdl.param.value

Table Filter:  &mdl.param.name == WT

 

This will create a single cell repeat region that only displays that one parameter value from the active model (when the repeat region was created.)

 

Once that's working, you can add additional relations to manipulate the value of WT however you want and return something else.  Just remember to change the cell value to refer to your new custom parameter inside the relations.  (&rpt.rel.WT_KG or whatever.)

View solution in original post

20 REPLIES 20

Hi,

the mentioned functionality cannot be defined in the Drawing/Format mode, because these working modes do not enable to define relations. You have to define parameters & relations in Part mode and call these parameters in table cells.

 


Martin Hanák

What if I made the weight a parameter of the part, could I then set up a formula in the table to pull that weight and convert it to metric?

TomU
23-Emerald IV
(To:RL_10410177)

Yes, but the approach changes slightly if this is a single part drawing or an assembly drawing.  Either way, a repeat region will be required.

That would be fine, I've got other repeat regions in my template as well. This would be for an assembly drawing but would only be pulling the weight from the top level part. my parameter is lable "WT", and I've tried creating a repeat region with &WT/2.2 but that just shows up as VALUE/2.2. How do I get the region to treat it as a formula?

TomU
23-Emerald IV
(To:RL_10410177)

TomU_0-1676039385555.png

TomU_1-1676039441489.png

See attached assembly.  (Creo 9.0)

 

I input your formulas exactly as you wrote them but my table came back blank. I'm using creo 4.0, could that be why?

TomU
23-Emerald IV
(To:RL_10410177)

When you entered the values in the table rows, did you type what you see above or use the picker?  The text above does not show the leading "&" that must be present in each cell.

TomU_0-1676555811350.png

 

Here is what I put into the template form:

RL_10410177_1-1676558079169.png

And here is what shows up when I apply it to an assembly drawing,

RL_10410177_2-1676558251316.png

 

StephenW
23-Emerald II
(To:RL_10410177)

Notice on TomU's, anything defined in the repeat region relations don't use asm.mbr.xxx, they use &rpt.rel.wt_kg

TomU
23-Emerald IV
(To:StephenW)

Yep, what @StephenW said.  From your picture above, you would need "&rpt.rel.WT_KG" entered in the table cell.

 

Just to test it, hard assign a value outside the IF statement in the relations.

WT_KG = 12345

on the template:

RL_10410177_3-1676561785207.png

 

symbol on the drawing:

RL_10410177_2-1676561762271.png

 

still blank. didn't pull the hard value either:

RL_10410177_4-1676561811648.png

 

Thoughts? I really appreciate yal'll helping me with this. 

TomU
23-Emerald IV
(To:RL_10410177)

It sort of looks like only that one cell is your repeat region.  It's going to be much easier to troubleshoot if you have some additional columns in the repeat region for debugging.  Add "&asm.mbr.name" to one column and &asm.mbr.WT" to another, just to see what kind of inputs you're getting to the relations.

table with more columns:

RL_10410177_0-1676574119300.png

that created a whole bunch of rows this time, not sure why.

RL_10410177_1-1676574441933.png

here's the region attributes for reference:

RL_10410177_2-1676574484094.png

 

 

TomU
23-Emerald IV
(To:RL_10410177)

Please use &asm.mbr.name in one of the columns, just for now...

RL_10410177_0-1676575216042.pngRL_10410177_1-1676575273153.png

RL_10410177_2-1676575288238.png

 

StephenW
23-Emerald II
(To:RL_10410177)

does every part have a parameter in the part called wt? I think that is problem one

You can use the system weight parameter PRO_MP_MASS instead.

StephenW
23-Emerald II
(To:RL_10410177)

You may want to download TomU's zip file on his original response.

 

There are several things I see in your table. I assume you are working in a drawing with an assembly as the model and that model is the active when you are creating this table.

 

The first cell, you are calling the weight as just a parameter cell, not in the repeat region. To use the relations, I think you need the weight used in the table.

 

Add in the name using asm.mbr.name first with no relations to make sure you get a table generated, then add  in the weight so that shows (still no relations)

 

Then add in the relation and the callout for the relation. I think you are fighting multiple problems and haven't ever gotten a basic table started.

 

 

StephenW_0-1676575862008.png

 

 

StephenW_1-1676575463051.png

 

StephenW_2-1676575483171.png

 

 

 

I kinda got it to work with rpt.rel.wt_kgs using this relation:

 

RL_10410177_1-1676576826377.pngRL_10410177_2-1676576835092.png

I say kinda since there are some blanks for some reason.

 

So this is great for a BOM table, but I just want it looking at the top level. Would I need an if statement to single it out?

TomU
23-Emerald IV
(To:RL_10410177)

You're options are a little limited with Creo 4.0.  There are some extra repeat region parameters that have been added to newer versions of Creo that make referring to the parent model easier.  Regardless, here's how to do this:

 

Table Cell:  &mdl.param.value

Table Filter:  &mdl.param.name == WT

 

This will create a single cell repeat region that only displays that one parameter value from the active model (when the repeat region was created.)

 

Once that's working, you can add additional relations to manipulate the value of WT however you want and return something else.  Just remember to change the cell value to refer to your new custom parameter inside the relations.  (&rpt.rel.WT_KG or whatever.)

TomU
23-Emerald IV
(To:TomU)

Working example in Creo 4.0 is attached.

Top Tags