Continue to Site

Eng-Tips is the largest engineering community on the Internet

Intelligent Work Forums for Engineering Professionals

  • Congratulations cowski on being selected by the Eng-Tips community for having the most helpful posts in the forums last week. Way to Go!

kg ----> lb 1

Status
Not open for further replies.

jacek0841

Mechanical
Aug 31, 2005
227
From thread559-87119

meintsi :13 Feb 04 9:49
You can use a design table to do the calculation and have it propagate a custom property for the value which can then be use to fill the note on the drawing.

I am trying to have weight of the part displayed on the drawing to be "bilingual", that is lb and kg.

I would like to have it done "automatically" that is when the weight of the part changes, BOTH values to get updated.

To have one value (either kg or lb) is no problem - but how to do both ?

So far using the Design Table (using the hint given by meintsi) I have managed to do this:

A B C
1 Design Table for: My_Part
2 $prp@value_1 $prp@value_2
3 First "SW-Mass@@First@My_Part.SLDPRT" #VALUE!


The Formula in the cell C3 is: =B3 * 2.2

In the Properties I have:

Name Type Value/Expr Evaluated
------------------------------------------------------
Weight_kg Text $PRP:"value_1" 167
Weight_lb Text $PRP:"value_2" #VALUE!


By puting note on drawing $PRPSHEET:"Weight_kg" I get 167, which is correct weight in kg.

By puting note on drawing $PRPSHEET:"Weight_lb" I get #VALUE!

The problem lies in the Design Table - the formula in C3 evaluates to #VALUE! with a green triangle in top left corner.

No matter what I tried to do (formatting the cel C3 and B3 - both are (?) set to Number) I get what you see above ... Sigh :-( ...

Can anybody help please.



 
Replies continue below

Recommended for you

Could you use a SW Equation rather than a Design Table?

Ken
 
Could you use a SW Equation rather than a Design Table?

Of course - and I tried out that too ... The problem I had was - how to get that 'variable' (mass, weight - whatever) into the equation - I ALWAYS get "The syntax of the equation is incorrect" message. :-(
 

Just got a hint from my office Excell guru - SW probably uses the Excell Design Table as some kind of "Dumb Data Storage" area and only SW knows how to interpret the data in the cells - (for example you could write an lenghty article in the cell,)

but Excell does not know what to make out of:
"SW-Mass@@First@My_Part.SLDPRT" - only SW does.

So I guess, Design Table might not be the route to go - equation would be fine, but:

- How do I get the "SW-Mass" (or whatever) into the equation without getting the syntax error ??
 
Cell B3 should be a value being read from the properties of the part.
Instead of telling the DT where to look, let the DT populate itself with the property from the model. Then copy that value to an "out-of-DT-range" cell & use that to calculate the alternative weight.


The new property can then be linked into a drawing note.

[cheers]
Helpful SW websites FAQ559-520
How to get answers to your SW questions FAQ559-1091
 
CorBlimeyLimey .......

Yes Sir, it works !!!

One little thing - Solid model units are lb 2 dec places - I do get kg with fifteen decimal places.

Any way to limit the decimal places ??

Thanks !!
 
You can change that from within Excel. Higlight the cell (or column) and go to Format > Cells > Number then select the number of Decimal places.

BTW, you should not have to "copy that value to an "out-of-DT-range" cell". I first tried using the value in cell B3 but for some reason it did not work, so I tried the solution posted which worked fine. I then tried again using B3 & it worked the way it should.???

Glad you're up & running anyway.

[cheers]
Helpful SW websites FAQ559-520
How to get answers to your SW questions FAQ559-1091
 

Figured out myself - thanks for reply anyway.

BTW what you say
Format > Cells > Number
does NOT work for me - yes, it does display 2 dec. digits but in Des Table ONLY !! The "Properties" and the drawing note still get 15 dec places :-(


I got it working by puting in the "final" column a function:

= ROUND (F3,2)

where column F is the "intermediate" column.

Thanks everybody !!
 

I just discovered that the Design Table does NOT get up-dated when doing CTRL-Q and has to be done "manually" that is Edit Design Table.

Am I correct ??
 
Unfortunately, yes you are correct. That is a limitation with DTs. I believe someone posted a macro (quite a while ago) which opened & closed the DT thereby forcing an update. It's a only a workaround, but might help.
Hopefully someone will be able to find it & repost or suggest a better alternative.

[cheers]
Helpful SW websites FAQ559-520
How to get answers to your SW questions FAQ559-1091
 
Since this thread is on top thought I'd chime in that kg's are units of mass, not weight. I know this is bringing up the whole lbm vs lbf, mass vs force thing, where W=mg, a physics agrgument in a world where weight and mass have become synonyms, but its Friday and I felt like acting out.
 
Thats too Weighty of a topic to exlb on for a Friday, and it could quickly degenerate into Mass hysteria ... especially if the kgb gets involved. [smile]

Have a great weekend.

[cheers]
Helpful SW websites FAQ559-520
How to get answers to your SW questions FAQ559-1091
 
I remember back in a VMS systems class, the instructor mentioned that a part of the cpu area was named KGB and the internal process that kept track of what it was doing was named CIA.


"Wildfires are dangerous, hard to control, and economically catastrophic."

Ben Loosli
Sr IS Technologist
L-3 Communications
 
This method works if you use only one type of mass units. But in our company we use both pounds and kilograms in our parts.
Does anyone know if it is possible to tell the Design table what units of mass are being used in the part, so that regardless of the unit used, the weight on drawing will be correct?
 
The final drawing "weights" are populated from the models properties, not the DTs.
You will have to set the models mass property to suit the UoM.
i.e. Weight-lb or Weight-kg being the "driving" property.

The models mass property will then populate the DT, be used in the conversion formula and then populate the alternative weight property of the model.

You will also have to adjust the conversion (lb to kg or kg to lb) in the DT accordingly.

[cheers]
Helpful SW websites FAQ559-520
How to get answers to your SW questions FAQ559-1091
 
Yes, but that means that if the models mass property setting is not correct, the displayed mass is also not correct and I'd want to avoid that before automising.
 
Why would the models mass property not be correct?

[cheers]
Helpful SW websites FAQ559-520
How to get answers to your SW questions FAQ559-1091
 
Some of our templates and older parts are set to pounds instead of kilograms. When an engineer doesn't correct that, the displayed weight will be wrong.
 

jacek0841:
I got it working by puting in the "final" column a function:

= ROUND (F3,2)

where column F is the "intermediate" column.

Found out there is no need for an "intermediate" collumn - to get from kg ---> lb the following will do:

=ROUND((C3*2.2),0)

where collumn C is $PRP@Weight_kg. The 0 (or 1, or 2 ...) is the number od decimal places one wants to have displayed in the dwg note.

 
Status
Not open for further replies.

Part and Inventory Search

Sponsor