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

Community Tip - Visit the PTCooler (the community lounge) to get to know your fellow community members and check out some of Dale's Friday Humor posts! X

Switching Unit Systems with Parameters that have units

lhoogeveen
17-Peridot

Switching Unit Systems with Parameters that have units

Is there a way to hard code Parameter Units to get ignored when switching units systems? I have a couple Parameters driven from Relations (e.g. WT_LB, MASS_KG, VOLUME_IN, and VOLUME_CM) and I would like them to always be in lbm, kg, in^3, and cm^3. Switching from in-lbf-s to mm-kg-s changes only the in^3 but changing back changes kg and the now mm^3.


This thread is inactive and closed by the PTC Community Management Team. If you would like to provide a reply and re-open this thread, please notify the moderator and reference the thread. You may also use "Start a topic" button to ask a new question. Please be sure to include what version of the PTC product you are using so another community member knowledgeable about your version may be able to assist.
ACCEPTED SOLUTION

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

You have to play games and manually convert from one system to another with unit less parameters.  See this: Feature Parameters in Repeat Region (BOM Table)

View solution in original post

20 REPLIES 20
TomU
23-Emerald IV
(To:lhoogeveen)

You have to play games and manually convert from one system to another with unit less parameters.  See this: Feature Parameters in Repeat Region (BOM Table)

lhoogeveen
17-Peridot
(To:TomU)

Tom Uminn

I'm testing your method right now. It looks pretty flexible and hands off as well is easy to copy into legacy parts without having to turn on or define units to parameters. Our start parts calculate from model tree analysis features rather than using the MASS_PROPERTY_CALCULATE AUTOMATIC config setting. Just the way we've always done it. Do you know if analysis feature relations can be set to 'Post Regeneration'? Doesn't seem like it should be able to since it's in the model tree.

Thanks,

Luke

Analysis features run at their point in the regen cycle.  Same with relations buried in sketches.

By using analysis feature or the pre- and post-regen areas of the relations dialog, you can control when any given equation gets calculated.

--
Doug Schaefer | Experienced Mechanical Design Engineer
LinkedIn
dgschaefer
21-Topaz II
(To:TomU)

That's pretty clever, if a bit complicated.

--
Doug Schaefer | Experienced Mechanical Design Engineer
LinkedIn

Doug Schaefer

I agree that it's clever for who set it up but the use of it has been poor across users. Most don't move the features to the bottom of the model tree and the conversation was hard coded before to a unit less ratio (switching unit systems would give the wrong results).

I'm hoping that by moving these features to the Footer and letting people switch unit systems on the fly, users will get more accurate weight and less opportunity not calculate it.

Thoughts switching to a MASS_PROPERTY_CALCULATE AUTOMATIC or Designating WT_LB or MASS_KG to Windchill? I'd love to start making it automatic for all users but I don't want to fake Creo/Windchill out think parts have actually been updated when they haven't. Especially for legacy parts that would have the relations added.

Thanks,

Luke

I was referring to Tom's system of maintaining proper units regardless of unit system.

Getting automatic anything regardless of what your user does is always a challenge.

--
Doug Schaefer | Experienced Mechanical Design Engineer
LinkedIn
lhoogeveen
17-Peridot
(To:TomU)

Here's the code I used since MASS and VOLUME were create in an model tree analysis feature:

ONE_LBM=1[lbm]

ONE_KG=1[kg]

ONE_IN3=1[in^3]

ONE_CM3=1[cm^3]

WT_LB=MASS:FID_PART_MASS/ONE_LBM

MASS_KG=MASS:FID_PART_MASS/ONE_KG

VOLUME_IN=VOLUME:FID_PART_MASS/ONE_IN3

VOLUME_CM=VOLUME:FID_PART_MASS/ONE_CM3

When you set the new units you are presented with this dialog:

Capture1.JPG

Click on the "Parameters" tab, There you'll find a list of parameters that are defined with units in the current unit system.  Look for any unit driven parameters that you need to remain in their existing units and set them to "ignore".

Capture2.JPG

In my case, the first three should change with the unit system, the other two I need to stay in pounds & inches respectively.

--
Doug Schaefer | Experienced Mechanical Design Engineer
LinkedIn

Doug,

Can that get set as the default so every time someone switches it would remain IGNORE'd? It resets every time for me. I'm reworking our start parts and would like all future switches to be ignored.

Thanks,

Luke

No, as far as I know, you need to review that list every time you change units.  In my experience, a unit change doesn't happen that often

Sounds like a great Product Idea request.  Another would be nmot to bury those unit driven parameters in another tab, but display them right in the main dialog so they are harder to miss.

--
Doug Schaefer | Experienced Mechanical Design Engineer
LinkedIn

Maybe I am missing something here, but why not just drop a mass properties feature into the footer and define your alternate parameters there.  User parameters defined in a mass properties feature can have units assigned and will retain their units when the units of the model are changed.  Being in the footer means that the mass properties are automatically calculated at the end of the part regeneration.  I added this to all of our start parts a while back so it is already there.  For the transition, I had a mapkey set up and also passed out a set of instructions so the engineers could fix any problem files in their current projects.

Capture.PNG

Larry Srutkowski

What happens when you switch units systems on your part with this setup? It's a common enough occurrence for us. Also, I'm not sure how to create local parameters from Analysis features.

My code above seems to work great for defining regardless of units system... except Sheetmetal Relations don't work with things like [lbm].

Thanks,

Luke

When you switch units, the default units of the model will change, but the calculated units are defined in the parameters, so Pro|E / Creo will automatically convert the exist value to the requested unit of the user parameters.

Now that I read that sentence again, it does sound a bit confusing...

The attached PDF pages are from our old WF4.0 work instructions (I cut out the non-essential information).  The same method works for Creo with one minor change: before you set the units of a parameter, you need to define the type of unit in the preceding column (if you look at my previous post, you can see where the column before the units says "mass").  I am guessing that PTC did this so you do not have to scroll through a list of 30+ units.

As for calling the units, you need to call &<parameter>:<feature ID number> or &<parameter>:FID_<mass property name>.

TomU
23-Emerald IV
(To:lsrutkowski)

Excellent solution.  I really like this.  Seems very robust.

By the way, it does behave fine when changing the part's units.

Correction.  It does not work.  Changing the part's units changes the parameter's units messing up the desired result.

g.PNG

The only way to prevent this is to manually excluded these parameters when changing units (like Doug mentioned above).

c.PNG

Correct me if I'm wrong, but (Creo 2.0, M160) I'm seeing this needing a double regen to be accurate.  The first regen updates the parameters generated by the MP feature, the second updates those driven by the relation.  I think that is because the feature relations in the MP feature are processed before the mass props are calculated by the MP feature.

Setting mass_properties_calculate to yes and putting the relations in the post regen section seems to update the parameters in one regen.

The unit driven feature parameters also seem to get their units changed when converting to a unit system.  No real advantage here.

--
Doug Schaefer | Experienced Mechanical Design Engineer
LinkedIn
TomU
23-Emerald IV
(To:dgschaefer)

Good catch Doug.  I've updated my response above accordingly.  Looks like we're back to my original solution.  It's the only "idiot proof" solution (as long as the idiots don't delete the relations.) 

dgschaefer
21-Topaz II
(To:TomU)

Did you see the need for a double regen too?  I was surprised by that.

--
Doug Schaefer | Experienced Mechanical Design Engineer
LinkedIn

Doug Schaefer,

how are you testing that you see a need for a double regen?  I was checking for that after you mentioned it, but the only thing I saw was that an annotation displaying the parameter information had a hard time updating (I had to mouse-wheel zoom after regeneration to get the annotation to update).

As for the parameter changing...that is something new, but I see it now (we had standardized to a kg-N-sec system a few years ago, so we do not switch model units anymore, so I never saw this happen).  What is odd is that it is only changing the user parameter that originally matched the units of the model for me, not all of them (in my case, start model was in KG, so switching to lbm-in-sec changed mass_kg units from kg to lbm, but mass_g, mass_lb, and mass_oz remained).

I'm working in Creo 2.0 m130 here, what about you Tom Uminn‌?

Further followup: is this a bug or working as intended?

I made a simple part with a simple cylinder.  I created the MP analysis feature and put it in the footer.  I created the relations to define several mass & volume parameters with alternate units. These are the parameter values I got when the cylinder was 500 dia x 100 long (MASS & VOLUME are the parameters from the MP feature):

Capture1.JPG

I then changed the diamter to 100 and regenerated the model.  I got this:

Capture2.JPG

Notice the VOLUME parameter, generated buy the MP feature, changed, but VOLUME_IN, generated by the relations, did not update.  I regenerated the model again (no changes) and got this:

Capture3.JPG

Now the relation driven parameters have changed to match the MP parameters.

For reference, here are the relations inside the MP feature:

Capture4.JPG

--
Doug Schaefer | Experienced Mechanical Design Engineer
LinkedIn

I'm getting a weird situation where the code listed above works for .ASM and a solid .PRT but not for a sheetmetal .PRT. It doesn't seem to recognize the units in the relations. Is this normal with sheetmetal or a bug with Creo 3? I'm running Creo 3.0 M010.

Never mind. Relations>Utilities>Unit Sensitive needs to be  turned on.

150908 Start Part Relations - Sheetmetal Part Weight Issue.jpg

Announcements
NEW Creo+ Topics: Real-time Collaboration


Top Tags