Inventor General

Reply
New Member
A.Kyllo
Posts: 2
Registered: ‎11-26-2012
Message 1 of 6 (425 Views)

Mass in title block.

425 Views, 5 Replies
11-26-2012 02:13 PM

I have added the mass properties and I do not want the lbmass behide it. How do I get rid of it?

Valued Mentor
SeanFarr
Posts: 475
Registered: ‎07-25-2012
Message 2 of 6 (414 Views)

Re: Mass in title block.

11-26-2012 02:53 PM in reply to: A.Kyllo

I asked this same question a few months ago, with the good help of some fellow forum users, this is how I got rid of it. See link below:

 

http://forums.autodesk.com/t5/Autodesk-Inventor/How-do-I-change-lbmass-units-Weight-in-Title-Block-R...

 

 

Also I edited this line in the code to round to the nearest half pound for my need using this:

 

iProperties.Value("Custom", "TotalWT") = (Round((mass*2.20462262)*2))

but you can set it to whatever result you want.

 

Good Luck, worked for 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
Employee
Yijiang.Cai
Posts: 350
Registered: ‎05-20-2008
Message 3 of 6 (389 Views)

Re: Mass in title block.

11-27-2012 01:36 AM in reply to: A.Kyllo

It looks that you have added the model physical property "Mass" in title block, but you do not want the unit of mass. Based on this requirement, please see the steps to accomplish -

1. Create one text custom property named "ModelMass"=0 in drawing document

2. Add this custom property in title block

3. Create one iLogic rule, and copy and paste the code lines below in rule

doc = ThisDrawing.ModelDocument
doc.update
iProperties.Value("Custom", "ModelMass")=doc.componentdefinition.massproperties.Mass
InventorVb.DocumentUpdate()

 

4. Run the rule, and you will get mass without unit in title block


5. Add this rule to "After Save Document" within event triggers. When saving the drawing document, the rule will run automatically. Please see the attached image.

Thanks,
River Cai

Inventor Quality Assurance Team
Autodesk, Inc.
New Member
A.Kyllo
Posts: 2
Registered: ‎11-26-2012
Message 4 of 6 (370 Views)

Re: Mass in title block.

11-27-2012 05:25 AM in reply to: SeanFarr

Do you have a screen shot of the code I can't seem to get it to work?  If you could that wold be great.

 

Adam

*Expert Elite*
Cadmanto
Posts: 3,175
Registered: ‎12-07-2011
Message 5 of 6 (362 Views)

Re: Mass in title block.

11-27-2012 05:42 AM in reply to: Yijiang.Cai

I've had s similar issue come up where we have wanted to change the units callout to look differently.

What we have is "lbmass"  What if we wanted "LB Mass" or just "LB".  How would this be done?

Best Regards,
Scott McFadden
Inventor Professional 2013
(Colossians 3:23-25)

Valued Mentor
SeanFarr
Posts: 475
Registered: ‎07-25-2012
Message 6 of 6 (358 Views)

Re: Mass in title block.

11-27-2012 05:55 AM in reply to: A.Kyllo

The code I used was taken from the post I linked to, cwhetten gave it to me, but I have attached a screen shot of it in the VBA browser.

 

A few things that are required:

1-this is not an automatic rule, needs to triggered either manually or by setting up an event, event example I use, is when the document is saved the mass is updated. 

2- this rule spits out a value with no units, for some reason it retrieves a value in KG by default so that is why there is  small equation ((Round((mass*2.20462262)*2) to convert back to lbs. The unit display is a manual input see attached screen shot.

3- this rule only works when a base view of an actual model with mass is placed on the drawing triggered(saved). meaning if you only have a sketch or a view of a something that does not have a mass, then the rule will have an error. I get this all the time when I do a top view layout sketch using our drawing template.

 

Should work for ya!

 

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

You are not logged in.

Log into access your profile, ask and answer questions, share ideas and more. Haven't signed up yet? Register

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 to get help installing your software.

Ask the Community


Inventor Exchange Apps

Created by the community for the community, Autodesk Exchange Apps for Autodesk Inventor helps you achieve greater speed, accuracy, and automation from concept to manufacturing.

Connect with Inventor

Twitter

Facebook

Blogs

Pinterest

Youtube