Inventor General Discussion

Inventor General Discussion

Reply
Valued Mentor
SeanFarr
Posts: 475
Registered: ‎07-25-2012
Message 1 of 10 (1,942 Views)
Accepted Solution

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

1942 Views, 9 Replies
08-17-2012 09:00 AM

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
*Expert Elite*
cwhetten
Posts: 1,071
Registered: ‎09-03-2008
Message 2 of 10 (1,937 Views)

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

08-17-2012 09:13 AM 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.

*Expert Elite*
mrattray
Posts: 2,481
Registered: ‎09-13-2011
Message 3 of 10 (1,932 Views)

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

08-17-2012 09:50 AM 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

*Expert Elite*
cwhetten
Posts: 1,071
Registered: ‎09-03-2008
Message 4 of 10 (1,927 Views)

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

08-17-2012 10:06 AM 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).

*Expert Elite*
mrattray
Posts: 2,481
Registered: ‎09-13-2011
Message 5 of 10 (1,925 Views)

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

08-17-2012 10:18 AM in reply to: cwhetten

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

Mike (not Matt) Rattray

*Expert Elite*
cwhetten
Posts: 1,071
Registered: ‎09-03-2008
Message 6 of 10 (1,922 Views)

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

08-17-2012 10:29 AM 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.  :smileytongue:

 

Oops.png

*Expert Elite*
mrattray
Posts: 2,481
Registered: ‎09-13-2011
Message 7 of 10 (1,919 Views)

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

08-17-2012 10:32 AM in reply to: cwhetten

I know, I just wasn't paying attention. :smileyhappy:

Mike (not Matt) Rattray

Valued Mentor
SeanFarr
Posts: 475
Registered: ‎07-25-2012
Message 8 of 10 (1,880 Views)

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

08-20-2012 06:21 AM 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
Valued Mentor
SeanFarr
Posts: 475
Registered: ‎07-25-2012
Message 9 of 10 (1,869 Views)

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

08-20-2012 08:20 AM 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
New Member
ISAAKWALLWUASA
Posts: 1
Registered: ‎09-15-2012
Message 10 of 10 (953 Views)

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

11-26-2013 07:01 AM 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

Announcements
Are you familiar with the Autodesk Expert Elites? The Expert Elite program is made up of customers that help other customers by sharing knowledge and exemplifying an engaging style of collaboration. To learn more, please visit our Expert Elite website.
Need installation help?

Start with some of our most frequented solutions or visit the Installation and Licensing Forum to get help installing your software.