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: 

Model Density Weight

23 REPLIES 23
SOLVED
Reply
Message 1 of 24
Cadmanto
1292 Views, 23 Replies

Model Density Weight

We have the weight of our models in the titleblock.

The problem I have having is if I check this model/drawing set in and out of the vault I have to constantly

go back to the model properties and select "Update" to get the value to populate in the titleblock.

This is a pain given that sometimes this is not caught until after the drawing is printed.

Isn't there a setting somewhere that maintains the weight value in the drawing?  Or is this something that needs to be addressed and a short coming of the software.

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


23 REPLIES 23
Message 2 of 24
Cadmanto
in reply to: Cadmanto

Based on no responses, can I assume there is no setting for this?

 

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


Message 3 of 24
cwhetten
in reply to: Cadmanto

It probably depends on how you got the weight to display in the title block.  Can you describe or show an example of how you went about this?

Message 4 of 24
Cadmanto
in reply to: cwhetten

Chris,

I am just pulling it in from the model mass property.  Is there another place I ahould be pulling it from?

 

MASS.JPG

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


Message 5 of 24
cwhetten
in reply to: Cadmanto

I have an iLogic rule in my drawings that reads the mass of the model and writes it to a custom iProperty.

 

Since the value is stored in a custom iProperty, the drawing always displays a value (the value obtained the last time the rule was run).  I just run the rule manually when the model changes, but there are other options for triggering the rule after certain events.

 

I have attached the rule if you would like to give it a try.

Message 6 of 24
Cadmanto
in reply to: cwhetten

Thanks Chris.

This may be exactly what I was looking for.  When I get a moment I will give it a try.

 

Can I assume that if I run this ilogic rule with in each of these drawings I am having issues with this

value will stick?

 

Is all I have to do is paste the text of the attached file you supplied into an ilogic rule in the drawing and

keep the title block the way it is?

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


Message 7 of 24
cwhetten
in reply to: Cadmanto

Yes, once you run this rule, the value will stick.  Like I said before, it's not a live value, i.e. it doesn't display the current mass of the model until you run the rule again.  It's not a problem for me, and maybe it won't be for you, but I just wanted to make sure that you're aware of this.

 

To get it to display in your title block, you have to insert a text field of type "Custom Properties - Drawing", and the Property is "TotalWT" (see the image below).

 

TB Weight.png

Message 8 of 24
Cadmanto
in reply to: cwhetten

I am just getting back to this.  Finally had some time to work on it.

You said ", but there are other options for triggering the rule after certain events."

What are the other options you are speaking about?

 

This is a shot of this rule.  Can you tell me if I should select anything specific under the "System" tab?

ilogic.PNG

I also get this error message when exiting the eidt rule dialog box.  What exactly does this mean?

error.PNG

Thanks

 

Inventor Suite 2012
Windows 7

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


Message 9 of 24
swhite
in reply to: Cadmanto

We just made a custom parts list that has one colum and one row that adds the weights of all the parts to get assembly weight so updates everytime a part updates and is placed just as any other parts list. have seperated it out for clarity.

 

 

Steven White
Lee C. Moore, Inc.
www.lcm-wci.com
Inventor 2011
Intel Dual Xeon E31225 @ 3.1 GHz CPU
16 GB RAM
NVIDIA Quadro 600 GPU
Windows 7 - 64 Bit
Message 10 of 24
Cadmanto
in reply to: swhite

If I could get what you did in your parts list incorporated into my TB such that they always automatically update with out any manual interaction I would be all over that.

To this point I have not gotten any feedback telling me this is possible.  So I am stuck for now with what has been suggested above.

 

Inventor Suite 2012
Windows 7

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


Message 11 of 24
swhite
in reply to: Cadmanto

I'll test it out later and see if can't get it to do the title block too.

Steven White
Lee C. Moore, Inc.
www.lcm-wci.com
Inventor 2011
Intel Dual Xeon E31225 @ 3.1 GHz CPU
16 GB RAM
NVIDIA Quadro 600 GPU
Windows 7 - 64 Bit
Message 12 of 24
cwhetten
in reply to: Cadmanto

Hi Scott.

 

I'm not sure why you are getting that error.  You are running it inside of a drawing document, right?  Is it possible to post an example of a drawing that is having this error?

 

As for the "System" tab, I assume you mean the one under the snippets to the left of the iLogic editor (as seen in your image)?  You don't need to select anything in there to run this rule.  Those are just handy bits of code that are already written that you can insert when you are writing a rule.  The rule I gave you should be complete, so you don't need to add anything from the snippets.  Unless of course you wish to customize it for your own uses.

 

You can set up the rule to run after certain events happen by using the event triggers.  These can be found on the Manage tab, in the iLogic panel (see below).

 

Event Triggers.png

 

The list of events depends on context--you get a different list for a drawing than for a part, etc.  In this case, you may want to set it to run after open document, or maybe before save, or the iProperty change one may work.  To set an event trigger, just select the event and click the "Select Rules" button.  Tick which rule you want and it will add it under the selected event.

 

-cwhetten

Message 13 of 24
Cadmanto
in reply to: cwhetten

Hi,

Thanks for getting back to me.

Yes, I am doing this within an Inventor .idw.

Here is the error message I am getting.  When I select "OK" it just keeps cycling back to the "Edit Rule" dialog window.  I have to hit cancel to clear it.

ERROR.PNG

I have attached the file.  If you edit definition of the title block you will see a text string above it that I have linked to this rule through a property.

 

Inventor Suite 2012
Windows 7

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


Message 14 of 24
mrattray
in reply to: Cadmanto

Cadmanto, I believe this is what cwhetten was referring to:

 

Capture.JPG

 

Try the attached revision of cwhetten's rule.

Mike (not Matt) Rattray

Message 15 of 24
Cadmanto
in reply to: mrattray

Mike,

I pasted your rule text into the rule dialog and I was able to successfully without an error.  What I found interesting is if I paste in directly from the webpage I get no errors.  If I paste it first into a notepad file then paste it into the rule itself I get an error.

Beyond that I have the property setup on the drawing.  I even setup some triggers when to execute this rule.

No matter what I do the value still shows up 0 .  I even tried running the rule manually.  Still nothing.

Any thoughts?

 

ERROR.PNG

Getting closer though.

 

Inventor Suite 2012
Windows 7

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


Message 16 of 24
cwhetten
in reply to: Cadmanto

Scott--

 

I get the same error on the drawing that you posted.  However, the error goes away as soon as I place a model view.  I should have been more clear, but this rule assumes that there is a base view in the drawing somewhere.  The line that finds the filename of the model used in the drawing doesn't work if there is no model view!

 

The modification that Mike posted doesn't seem to work, even with a model view in the drawing.  This line of code:

 

mass = iProperties.Mass(modeldoc)

 

seems to expect a string of the component name or the path & filename, so it doesn't work when you give it the actual model document object.  It just returns 0, though I'm not sure why it doesn't give an error.  The original code I posted will work as long as you place a drawing view before you run it.

 

-cwhetten

Message 17 of 24
Cadmanto
in reply to: cwhetten

CW,

Thank you.  You were right.  When I placed your rule code into the view having a view already placed it did work.

What I find increasingly interesting is that after placing that rule and setting the triggers to run this rule before a save, now the weight updates in both locations.  My original TB setting and this new one you showed me.

I went even further to place this rule into one of the assembly drawings I was having issues with and not even link the rule to text.  After setting up the same triggers, my original TB property updates with a simple drawing save without having to update the properties in the assembly first.

I have my solution now.  Just a matter of which one I want.

Thanks again.

 

Inventor Suite 2012
Windows 7

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


Message 18 of 24
Cadmanto
in reply to: cwhetten

CW,

I can see that not having a view assigned is a pain when trying to impliment this rule into a drawing template.

Can I assume that you are placing this rule into your templates?

I also got the impression from you that you are manually running this rule.  If that is the case why aren't you placing triggers on this rule?

 

check.PNGIf this solved your issue please mark this posting "Accept as Solution".

Or if you like something that was said and it was helpful, Kudoskudos.PNG are appreciated. Thanks!!!! Smiley Very Happy

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


Message 19 of 24
cwhetten
in reply to: Cadmanto

That's quite interesting that your original method now works when this iLogic approach is implemented.  I suppose it is because the iLogic rule is getting the mass, and this forces an update.

I originally had this in my drawing template, but now I keep it as an external rule so it is available for any document, even older drawings that were created before I added it to the template.  I don't remember why I never set it up to use the event triggers, but I think one reason is because of the issues that arise when the rule runs in the absence of a model view.  Although, now that I keep it as an external rule, maybe I need to re-evaluate whether or not to set up an event trigger.

I'm glad I could help you out.  Smiley Happy

Message 20 of 24
Cadmanto
in reply to: cwhetten

I kind of figured that was why it was updating as well.

So you have yours setup as an external rule huh...Smiley Indifferent

Is it possible to setup the rule in both ways so the drawings being created get this rule in the TB and the ones already created can get it as well?  I could probably figure this out on my own in the AM, but since you have already created an external rule is it hard to do?

 

FYI, I found out that you were joining us EE's.  Congratulations!!!!  Let me be the first to welcome you.

I know this because I submitted your name and was told you were already on the list.

 

check.PNGIf this solved your issue please mark this posting "Accept as Solution".

Or if you like something that was said and it was helpful, Kudoskudos.PNG are appreciated. Thanks!!!! Smiley Very Happy

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


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

Post to forums  

Autodesk Design & Make Report