Weight question
Weight question
(OP)
One of the fields in my title block is weight in kg. To get the real value of the weight I have to set the measurement options in the part to "meters".
If someone else opens the part to verify a dimension and changes the options to something else, the value in the title block changes.
Anyone has an idea on how to freeze the weight? Or how to get the weight in kg independent of the option setting? Any
help would be greatly appreciated.
Andrew
If someone else opens the part to verify a dimension and changes the options to something else, the value in the title block changes.
Anyone has an idea on how to freeze the weight? Or how to get the weight in kg independent of the option setting? Any
help would be greatly appreciated.
Andrew






RE: Weight question
It's not the most technically advanced method, but I have been printing drawing files to pdf format in order to freeze the state at a certain point.
Jeff
RE: Weight question
thank you for your answer. It is a good suggestion but it's not exactly what I am looking for.
Andrew
RE: Weight question
Instead of publishing pdf's you can create your drawings, save them, then re-open them and select the option "CONVERT TO RAPID-DRAFT" prior to hitting the open button. What this does is convert the drawing over to the rapid-draft format. It is still a solidworks drawing file, but the difference is that it no longer seeks to load the model when you access it, similar to opening a drawing in read-only mode. This way only the graphic info is displayed as saved and system options should not affect anything on the sheet. One hting to remember though is that when you update a part or assem that the drawing references, you will receive a watermark that states (OUT OF SYNC) at that time you would open the drawing and this time selecting the LOAD MODEL option before clicking the open button.
The other thing is to have other people that are "Checking" dimensions in a part open the documents as read-only. You can also specify the read-only attribute through windows explorer if you so desire. this could prevent any unwanted changes to your part docs.
Hope that helps.
Regards,
Jon
jgbena@yahoo.com
RE: Weight question
Andrew
RE: Weight question
The SolidWorks API can return the mass properties for a part or assembly.
retval = ModelDoc2.GetMassProperties2 ( &status )
or
retval = SldWorks.GetMassProperties ( filePathName, configurationName )
Returns this variant
[ CenterOfMassX, CenterOfMassY, CenterOfMassZ, Volume, Area, Mass, MomXX, MomYY, MomZZ, MomXY, MomZX, MomYZ ]
Density = ( Mass / Volume )
Consistent with all other API functions, metric units will be returned unless otherwise specified. This will allow you to convert the results as they are independent of any user settings.
If you have in house capabilities for API programs or a VAR or vendor capable of API programing, this routine would be farely routine. With some slightly advanced skills it could react to notifications to stay up to date.
I would be happy to assist you with this task if you have trouble with the code.
Bill Briggs, CSWP