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: 

Mass in title block.

5 REPLIES 5
Reply
Message 1 of 6
A.Kyllo
2089 Views, 5 Replies

Mass in title block.

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

Tags (1)
5 REPLIES 5
Message 2 of 6
SeanFarr
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
Message 3 of 6
Yijiang.Cai
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.
Email: River-Yijiang.Cai@autodesk.com
Message 4 of 6
A.Kyllo
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

Message 5 of 6
Cadmanto
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
(Colossians 3:23-25)


Message 6 of 6
SeanFarr
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

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

Post to forums  

Autodesk Design & Make Report