Community
Inventor Forum
Welcome to Autodesk’s Inventor Forums. Share your knowledge, ask questions, and explore popular Inventor topics.
cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

How do I change lbmass units? Weight in Title Block? Rid of lbmass?

10 REPLIES 10
SOLVED
Reply
Message 1 of 11
SeanFarr
7338 Views, 10 Replies

How do I change lbmass units? Weight in Title Block? Rid of lbmass?

My drawing template title block has a section for estimated weight. This value and overall size is used to determine shipping methods of our products. This value is pulled from the Type->Physical Properties-Model and Property->MASS. There is no option to turn off units. When our clients look at the drawing, they often get confused with lbmass unit. example; When someone asks what the weight of the product is, we dont say it is 1300 pound mass, we say it is 1300 pounds. I have looked around all different forums and found no complete answer or solution to this.

 

The only thing closest to a solution that I found on this forum is to create a rule that creates a custom iproperty within the model.(http://forums.autodesk.com/t5/Autodesk-Inventor/How-to-remove-iproperty-mass-unit-string-from-Mass-v... 

 

You then have to create a text field in your title block that populates from that custom iproperty but can only be done when a base view is inserted from a model that has the custom iproperty rule applied.

 

From what I have tried, you can create a .ipt template to save you from creating that rule to create a custom iproperty each and everytime, but to populate the title block field, a user needs to create that text field and draw from that custom iproperty once the base view is set on the drawing.

 

I also found a way to incorporate mass without units but the information will be put into the parts list. So instead of the weight being "automatically" entered into the title block after inserting base view, I could create a parts list for every drawing. (Not a good solution) http://forums.autodesk.com/autodesk/attachments/autodesk/78/323891/1/mass.jpg

 

One last solution that I found, is there used to be a tool called iProperty Collection (http://ipc.barok.dk/) that gave users the ability to customize some Inventor functions. One being the ability to change the unit displayed for MASS. I haven't tried using this tool becasue the last update off the website stated in 2009; says the software is not compatible with Inventor 2009 64bit, since I am using Inventor 2012 64bit, I think this is a dead end. 

 

If anyone has any info or help, please post or reply, you are not just helping me, but the entire Autodesk Community.

 

Thanks

 

Sean

 

 

 

 

Sean Farr
Product Designer at TESInc.ca

Inventor Professional 2014-Update 2 - AutoCAD Electrical 2014
Win7-x64 | ASUS P8Z77-V | i7 3770 -3.4 GHz | 32GB RAM |
240GB SSD | nVidia GTX 670 4GB - 320.49
10 REPLIES 10
Message 2 of 11
cwhetten
in reply to: SeanFarr

I do something similar to the first method you mentioned, except, instead of having an iLogic rule at the part level, I have a rule at the drawing level.

 

I created a rule in my drawing template that gets the mass of the model document in the view that was placed first.  It stores this mass value to a custom iProperty called TotalWT.  This TotalWT is displayed in my title block.  Here is the code:

 


doc = ThisDoc.Document
customPropertySet = doc.PropertySets.Item("Inventor User Defined Properties")
 
'Make sure TotalWT property exists
Try
      prop = customPropertySet.Item("TotalWT")
Catch
      'Assume error means not found
      customPropertySet.Add("", "TotalWT")
End Try


'Find the filename of the model used in the drawing
modeldocname = IO.Path.GetFileName(ThisDoc.ModelDocument.FullFileName)

'Find the mass of the model used in the drawing
mass = iProperties.Mass(modeldocname)

'Write the mass of the model to the TotalWT custom iProperty.
'The mass is converted from kg to lbs and rounded to the nearest integer
iProperties.Value("Custom", "TotalWT") = Round(mass*2.20462)

InventorVb.DocumentUpdate()

 

 


The way I have it set up, this rule is completely manual.  It is not a real-time measure of mass (it's like a snapshot of the mass at the time the rule is run), so if my model changes I have to remember to update it (by executing the rule again).  There are probably ways to make it less manual, but it works for me so I haven't gone any further with it.

 

Like I said, I just added this rule to my drawing template so that it is available for any new drawing I create.  You could also create it as an external rule, so that it is available for any drawing whether it is new or old.  Also, the first part of the code detects whether or not the TotalWT iProperty exists.  If it does not, it creates it for me.  This is useful for running the rule on drawings that were created before I set up my template.

Message 3 of 11
mrattray
in reply to: cwhetten

Why don't you just tweak that iLogic rule to write to a user parameter instead of a property? You could then set the user parameter to export to properties, giving you the option to customize the export options and therefore controlling display of the units.

Mike (not Matt) Rattray

Message 4 of 11
cwhetten
in reply to: mrattray

I don't see a way to export a user parameter to a custom iProperty in the drawing environment (which is where this code resides).  You would have to do that at the part/assembly level (which is the first method the OP referenced).

Message 5 of 11
mrattray
in reply to: cwhetten

My reply was addressed to the OP who's code resides in the model.

Mike (not Matt) Rattray

Message 6 of 11
cwhetten
in reply to: mrattray

Oh, ok. I couldn't tell.

 

FYI, whichever message you click the reply button, it will say "in reply to" the user who posted that message.  ...That was an awkward sentence.  See the image for the correct interpretation of what I just said.  Smiley Tongue

 

Oops.png

Message 7 of 11
mrattray
in reply to: cwhetten

I know, I just wasn't paying attention. Smiley Happy

Mike (not Matt) Rattray

Message 8 of 11
SeanFarr
in reply to: cwhetten

Thank you cwhetten! This rule works perfectly, I have applied it to my template this morning and set up a trigger to run the rule after I save the document. I have another rule that runs after a save that applies the scale to the title block as well. Once I get the formatting of the title block completed, I will upload it for others to use.

 

I have next to zero knowledge when it comes to programming/code, but I noticed that your code generates the weight in Kg then converts to lbs. Would it make sense if I deleted that part of the code, the result would be in kg? I am creating 2 drawing templates, one in standard and one in metric.

 

Also, your code rounds up to the nearest integer, I suppressed the "Round" command and it then provided a result with like 6 decimal places. Can the command be written to round up to the nearest half pound? example  2345.3999 lbs would be 2345.5 lbs, or .635 lbs would be 0.5 lbs?

 

Thanks for you help this far.

 

Sean

Sean Farr
Product Designer at TESInc.ca

Inventor Professional 2014-Update 2 - AutoCAD Electrical 2014
Win7-x64 | ASUS P8Z77-V | i7 3770 -3.4 GHz | 32GB RAM |
240GB SSD | nVidia GTX 670 4GB - 320.49
Message 9 of 11
SeanFarr
in reply to: SeanFarr

Thanks to the replies to this post and other posts I have managed to set-up our title block with the required information and requested format.

 

I am uploading the template file, for others to use or reference to. There is 2 rules one for scale and one for mass. I have adjusted the mass rule to display values to the nearest half pound.

 

My title block was designed for B sized sheet. Although if we decide to make larger prints in the future, I have created it, so that by changing one dimension ( the 6.000 length one)  the whole block scales up or down accordingly. All that is needed to adjust afterwards is the font size (text boxes are constrained to their locations).

 

Hope this can be used by many,

 

Thanks again to all the helped me.

 

Sean 

Sean Farr
Product Designer at TESInc.ca

Inventor Professional 2014-Update 2 - AutoCAD Electrical 2014
Win7-x64 | ASUS P8Z77-V | i7 3770 -3.4 GHz | 32GB RAM |
240GB SSD | nVidia GTX 670 4GB - 320.49
Message 10 of 11
ISAAKWALLWUASA
in reply to: SeanFarr

Thank You for posting this i have one question. is there a way to get it to jump to the next .1lbs instead of .5lbs?

 

Thanks in advance...

 

 

Isaak

Message 11 of 11
jstoffel4
in reply to: SeanFarr

I have added this to the Inventor ideas page. Please send me some Kudos and we can hopefully get Autodesk to make a change to this

http://forums.autodesk.com/t5/inventor-ideastation/option-to-display-lbmass-units-as-simply-lbs/idi-...

Can't find what you're looking for? Ask the community or share your knowledge.

Post to forums