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.
Solved! Go to Solution.
Solved by cwhetten. Go to Solution.
Solved by cwhetten. Go to Solution.
Solved by cwhetten. Go to Solution.
Based on no responses, can I assume there is no setting for this?
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?
Chris,
I am just pulling it in from the model mass property. Is there another place I ahould be pulling it from?
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.
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?
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).
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?
I also get this error message when exiting the eidt rule dialog box. What exactly does this mean?
Thanks
Inventor Suite 2012
Windows 7
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.
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
I'll test it out later and see if can't get it to do the title block too.
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).
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
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.
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
Cadmanto, I believe this is what cwhetten was referring to:
Try the attached revision of cwhetten's rule.
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?
Getting closer though.
Inventor Suite 2012
Windows 7
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
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
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?
If this solved your issue please mark this posting "Accept as Solution".
Or if you like something that was said and it was helpful, Kudos are appreciated. Thanks!!!!
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.
I kind of figured that was why it was updating as well.
So you have yours setup as an external rule huh...
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.
If this solved your issue please mark this posting "Accept as Solution".
Or if you like something that was said and it was helpful, Kudos are appreciated. Thanks!!!!