Community
Inventor Programming - iLogic, Macros, AddIns & Apprentice
Inventor iLogic, Macros, AddIns & Apprentice Forum. Share your knowledge, ask questions, and explore popular Inventor topics related to programming, creating add-ins, macros, working with the API or creating iLogic tools.
cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

Custom iProprerty expression =<MASS> =<VOLUME> is N/A

8 REPLIES 8
SOLVED
Reply
Message 1 of 9
p.rybar
670 Views, 8 Replies

Custom iProprerty expression =<MASS> =<VOLUME> is N/A

Problem to solve:

I have one custom iProperty set to expression "=<MASS>" and the other to "=<VOLUME">. I am processing large number of files (150k). About 5% files does not update the expression value. The value - in czech "(není)" ( english translation "(none)" or "N/A" ) is displayed. I tried several methods to update mass:

 

Inventor.PartDocument.Update

Inventor.PartDocument.Update2

Inventor.PartDocument.Rebuild

tmp = Inventor.PartDocument.ComponentDefinition.MassProperties.Mass

 

None of them works.

 

Using GUI the update in iProperties Physical prop tab does not work. The only thing that works is to click on "2":

 

 

 

I need API code to duplicate this action, but I rather have the full code than inventorApp.CommandManager.ControlDefinitions.Item  ("xxx").Execute()

 

Sample file attached.

 

chyparo

 

Inventor 2014 SP2

 

 

8 REPLIES 8
Message 2 of 9
humbertogo
in reply to: p.rybar

Try to Flush

Doc.PropertySets.FlushToFile()
Message 3 of 9
p.rybar
in reply to: humbertogo

This method works in Apprentice only 😞
Message 4 of 9
humbertogo
in reply to: p.rybar

http://forums.autodesk.com/t5/Inventor-General/How-to-find-the-Mass-Properties-of-a-Part/td-p/326829...

 

 

Make sure the Material is set correctly.  The mass is shown in the properties near the middle of the dialog box.  If it is showing as N/A, click the Update button and it should fill in.

Message 5 of 9
p.rybar
in reply to: humbertogo

Please, if you want to help me, open the sample ipt. The material is OK, the mass in the physical property tab is OK, problem is in custom property tab in expression =<MASS>.

Message 6 of 9
humbertogo
in reply to: p.rybar

i did open the file

Please, change the material to ABS Plastic apply and look the Custom properties

 

 

Capture.PNG

Message 7 of 9
p.rybar
in reply to: humbertogo

Material changed to ABS (select ABS from list, then Click on Apply):

-screenshot of Physical tab:

 Bez názvu.png

 

-screenshot of Custom tab is same as before:

 Bez názvu2.png

 

The Value is not updating - the only way to update value is as I wrote in my first post. So just another Inventor BUG.

 

Message 8 of 9
humbertogo
in reply to: p.rybar

Take a look at the recorder screen

Message 9 of 9
p.rybar
in reply to: humbertogo

Thank you for the video - it definitely shows, that the error is in material asset. I repeated your procedure and several materials do not throw the error. So I focused on this an the solution is to switch material asset to another asset and back.

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

Post to forums  

Autodesk Design & Make Report