Creating a "MASS" parameter within a content center family.

Creating a "MASS" parameter within a content center family.

jawilsonAQ3R6
Explorer Explorer
977 Views
7 Replies
Message 1 of 8

Creating a "MASS" parameter within a content center family.

jawilsonAQ3R6
Explorer
Explorer

I am creating a part that has multiple sizes, and I've used parameters within a family table. I assigned the material as "Iron, Ductile", but the mass that Inventor automatically assigns to it isn't what I'm needing it to be. The part has been simplified, but our actual parts have hollow parts that aren't present in the model I've made.

 

Is there a way that I can assign custom mass values within the family table to be assigned to individual parts?

Thanks.

0 Likes
978 Views
7 Replies
Replies (7)
Message 2 of 8

A.Acheson
Mentor
Mentor

Hi @jawilsonAQ3R6 

You can overwrite the mass and set its value from an ilogic rule on new document. You will need to replace the family template. This post here details the method. I would suggest you leave a comment in the table as to how this is working. 

 

 

 

If this solved a problem, please click (accept) as solution.‌‌‌‌
Or if this helped you, please, click (like)‌‌
Regards
Alan
0 Likes
Message 3 of 8

jawilsonAQ3R6
Explorer
Explorer

Can you please explain how I might use the iLogic rule? I haven't used it myself before. In the model, I created a user parameter "MASS", and within a new Rule labeled "MASS RULE", I set the model "Mass" = MASS , but even when I use iTrigger, the iProperty Mass doesn't change.

 

Any advice? Thanks.

0 Likes
Message 4 of 8

A.Acheson
Mentor
Mentor

Hi @jawilsonAQ3R6 

 

The code would be 

iProperties.Mass = Mass

 If you put this to run on new document event trigger this should overide the mass as the document is created. If you want to update this document from Content Center (CC) you would need to delete the CC file and allow a new member be generated. 

This is how I think it will work but I haven't done it in a while so it might not work like that given the read only status of a CC standard file after creation.

 

Alternately you could go and find the CC file in the files folder move it to a writable folder edit the mass and put it back to the Files folder again. No ilogic needed then. But it is a total manual operation. 

If this solved a problem, please click (accept) as solution.‌‌‌‌
Or if this helped you, please, click (like)‌‌
Regards
Alan
Message 5 of 8

jawilsonAQ3R6
Explorer
Explorer

I see. Do you think this would apply to each part I place from CC? And would it work if using the parts within an assembly?

0 Likes
Message 6 of 8

A.Acheson
Mentor
Mentor

Hi @jawilsonAQ3R6 

You will need to place this rule as an Internal rule into a custom placed part of that family. Carry out a replace family template which then allows the rule to run on any member of that family. Any time a new member is placed the rule should run and overide the mass from the parameter. I would suggest to test on a copy of the family untill you get it to work to your liking. 

If this solved a problem, please click (accept) as solution.‌‌‌‌
Or if this helped you, please, click (like)‌‌
Regards
Alan
Message 7 of 8

A.Acheson
Mentor
Mentor

I tested this and if you set the rule to be on new document event it will run the rule. If you change the mass afterwards it will  orderly update also so need to delete the file. Just be sure you map the user parameter to the mass  column in your CC . If you get stuck just message back.

If this solved a problem, please click (accept) as solution.‌‌‌‌
Or if this helped you, please, click (like)‌‌
Regards
Alan
Message 8 of 8

will.astill
Advocate
Advocate

Hi there.

 

Sorry to post to this again after so long, but just came across it while having the same issue.

 

This works brilliantly with my vault content centre, although I had to add it to the "Before Save" event instead to ensure that the custom property had updated in the part.

 

I also used this slightly different code to convert from grammes to Kg if it helps.

iProperties.Mass = iProperties.Value("Custom", "Custom_Mass") / 1000