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

Community Tip - Have a PTC product question you need answered fast? Chances are someone has asked it before. Learn about the community search. X

Parameter units in annotations and repeat regions

Pettersson
13-Aquamarine

Parameter units in annotations and repeat regions

Units in annotations and repeat regions is very weird. I made an assembly where I used component parameters to set tightening torques for screws. I set the Unit Quantity of the parameter to "Torque/Moment" and get to choose the unit "m N" (bit weird; it's usually expressed as "Nm", but whatever). So far so good.

 

To test it, I set the value to 10 on all my screws. Great. Now I'll add it to my repeat region. I add a column showing "&asm.mbr.cparam.torque". The result? 9999999994.879. What? Where did this come from? Where is my 10 Nm? Looks like Creo shows the value in a different unit. My suspicions are confirmed when I try adding a parameter with the default unit (mm^2 g / sec^2) instead. Indeed, here the value is conserved, and is displayed as "10.000" in my repeat region.

 

Hm, ok. Let's see the units, then. I change my repeat region to display "&asm.mbr.cparam.ptc_unit.torque". The result is as follows: The ones I added as "m N" get displayed as "moment2", and the one I added as "mm^2 g / sec^2" shows as "moment1". That's pretty annoying for anyone who wishes to display these units, as you'd have to write some cumbersome relations to get anything out of this. What's more, it's pretty weird that the value of the parameter is displayed in one unit (the default unit), but when I inquire about the unit, another (the original) unit is returned.

 

Ok, now can I decide the units that my parameters should be displayed in? I try "&asm.mbr.cparam.torque[m N]" and "&asm.mbr.cparam.torque[moment2]", but none of these work. I look at the detail options for the drawing, and the attributes for the repeat region, but can't find any settings to control the units. I get the same result using annotations, both in the assembly and in a drawing, writing "&torque:att_cmp" returns me a value of 9999999994.879, and no amount of adding [n N] or [moment2] seem to work.

 

The workaround for me will be simply doing the parameter as a string and adding the unit in the string, but it's a bit annoying that the units handling seems so broken. Am I doing something wrong, or is Creo incapable of doing this?

 

EDIT: By the way, I tried changing the assembly units to "mmNs", to no effect.

1 ACCEPTED SOLUTION

Accepted Solutions
Pettersson
13-Aquamarine
(To:cwilkes)

I'll add a new reply instead of editing my original one even more. You did set me on the right path. If I look in the unit set for the model parameters, I can click on the "Info" button to see what the torque unit is for the model. If I make a unit system with "m" as the length unit and "N" as the force unit, I will get a torque unit of "m N", and my value will be correctly displayed in the drawing.

 

This is still terrible, however, since I don't want my models in those units. I want my models in mm and g, but my torque in Nm. It looks like Creo won't let me have that. It seems like the only way to get what I want is to make a repeat region relation to transform the value to Nm. Something like this:

 

C = [Some conversion factor]

Torque = itos(asm_mbr_cparam_torque * C) + " Nm"

 

Still pretty weak that if I add a parameter with an explicit unit of Nm, I have to make a relation to convert the unit to Nm ...

View solution in original post

5 REPLIES 5

Hi,

ask PTC Support if you are patient enough ... 🙂


Martin Hanák

I don't think that unit you chose for the component parameter is newton-meters. It's probably referring to nanometers, which would explain why it's something like e^9 bigger than your parameter value. And I think what you're seeing with the inexact value is just a byproduct of the inherent inaccuracy of storing decimal points in binary.

 

Edit: Actually, it sounds like maybe somebody has made a custom unit called "m N" in your files, and given it some strange conversion value (I don't see "m N" in mine at all). Try Model Properties > Units > Change > Units tab, then click this "m N" in the list. If it allows you to Edit it, that's a custom unit type, and probably has it's own conversion value that's producing that odd number. I'd advise against using this unit unless you know what it is and what it's for.

Pettersson
13-Aquamarine
(To:cwilkes)

Thanks for replying, but that's not the issue. I don't have "m N" in my model properties, either. It's not a unit set, it's a unit.

 

EDIT: I missed that you were talking about the "Units" tab in that window. Still, I don't have it in my list, either. I have m and N, but not "m N". I don't think composite units like this appear in that list. There are no torque units at all. In fact, even if you add a new unit, you can't choose "Torque" as a Physical dimension.

 

Try this: Add a parameter, set the "Unit Quantity" to "Torque/Moment" and see what units are available. I have in^2 lbm / sec^2, m N, cm dyne, mm N, ft lbf, in lbf, and mm^2 kg / sec^2.

 

Nanometers would be a very strange unit for torque, and since I have both "m N" and "mm N", that would make the other one nanomillimeters, which doesn't make sense.

 

I have a basic installation and no company-specific standards. I've installed the software myself.

Pettersson
13-Aquamarine
(To:cwilkes)

I'll add a new reply instead of editing my original one even more. You did set me on the right path. If I look in the unit set for the model parameters, I can click on the "Info" button to see what the torque unit is for the model. If I make a unit system with "m" as the length unit and "N" as the force unit, I will get a torque unit of "m N", and my value will be correctly displayed in the drawing.

 

This is still terrible, however, since I don't want my models in those units. I want my models in mm and g, but my torque in Nm. It looks like Creo won't let me have that. It seems like the only way to get what I want is to make a repeat region relation to transform the value to Nm. Something like this:

 

C = [Some conversion factor]

Torque = itos(asm_mbr_cparam_torque * C) + " Nm"

 

Still pretty weak that if I add a parameter with an explicit unit of Nm, I have to make a relation to convert the unit to Nm ...

Glad I could help a bit. I don't do a ton with different units so I don't know how parameter/model units work with each other, but I figured there was some sort of conversion going on without you seeing. 

Top Tags