Good morning,
I am trying to create some new templates for 2013 and I'm trying to figure a way to get the model revision number to populate into the drawing's iproperty revision number so that they will match upon save. I'm trying to do this by creating an ilogic rule but I don't see a system property in the idw that will allow me to access the 3D model iprops. I am going to Event Trigger the rule to run Before Save. Is this possible?
On the drawing border I have created a formatted text box that is built as:
Type: Properties - Model
Property: Revision Number
It simply pulls the data from the models revision number and populates the text box. I need this same thing to happen but rather than populate into a text box I need it to populate into the drawings revision number iprop.
Solved! Go to Solution.
Solved by Curtis_Waguespack. Go to Solution.
Not entirely sure if this is what you want but it works for me.
Thanks for the post but no I'm wanting the models revisions number to populate into the drawings iproperty revision number. We did this with some VB code in the past but we are no longer going to use extermal VB on ilogic.
Hi kwilsonamerex,
You might try this.
Go to the Tools tab > Options panel > Document Settings button, and then click the Drawing tab in the dialog box.
Look for the Copy Model iProperty button toward the bottom.
This opens the Copy Model iProperty Settings dialog box where you can select model iProperties to copy into the drawing iProperties.
Do this in your drawing template and then save your template, and this setting will be setup for all new files. But for existing files you'll need a bit of code. I'll post back if I have a chance to create a quick rule.
I hope this helps.
Best of luck to you in all of your Inventor pursuits,
Curtis
http://inventortrenches.blogspot.com
Hi kwilsonamerex,
This rule reads the model document's rev# and writes it to the drawing's rev#.
I hope this helps.
Best of luck to you in all of your Inventor pursuits,
Curtis
http://inventortrenches.blogspot.com
'Look at the model file referenced in the open document Dim MDocFile As Document If ThisDoc.ModelDocument IsNot Nothing then MDocFile = ThisDoc.ModelDocument Else MessageBox.Show("This drawing has no model reference", "iLogic") Return End if 'format model file name Dim FNamePos As Long FNamePos = InStrRev(MDocFile.FullFileName, "\", -1) Dim docFName As String docFName = Right(MDocFile.FullFileName, Len(MDocFile.FullFileName) - FNamePos) 'set the drawing rev number to match the model rev number iProperties.Value("Project", "Revision Number") = iProperties.Value(docFName, "Project", "Revision Number") 'update the drawing iLogicVb.UpdateWhenDone = True
Thanks Curtis for chiming in!
Dang that's a nice little Copy Model Props feature. Buried though but thanks for pointing it out to me. I like using it however it seems it only populates the iproperty once time. If I go back and make a new revisions or title change on the model, it won't update that info back into the drawings iprops. Wierd....
But that's ok as we use Vault and will push down the next Vault revision via "Update Properties" in CAD once lifecycle has changed from Released to WIP.
So this will get me what I need and create a little less redundant manual entry from users. Thanks again Curtis! You The Man! 🙂
@kwilson_design wrote:Thanks Curtis for chiming in!
... however it seems it only populates the iproperty once time. If I go back and make a new revisions or title change on the model, it won't update that info back into the drawings iprops. Wierd....
Hi kwilsonamerex,
I'm happy that was useful.
As for the updating issue, if you go to the Manage tab you'll find an Update Copied Properties button that will help with this.
More on this from the help files:
Copy model properties to a drawing
Drawing Document Settings provide a mechanism for copying values of selected model iProperties to the drawing iProperties on first view creation. The copied properties can be used in parts lists, title blocks, and other functions that access model or drawing properties.
Update model iProperties in a drawing
Model iProperties copied to a drawing are not refreshed automatically when the model is updated. Use the Update Copied Model iProperties command to refresh the iProperties.
Notes:
I hope this helps.
Best of luck to you in all of your Inventor pursuits,
Curtis
http://inventortrenches.blogspot.com
Thanks for the useful info Curtis! I kept looking for the little lightning Update icon up top and never saw it. Dind't think to go into the Manage tab and walla, there it is! Thanks again!
Can't find what you're looking for? Ask the community or share your knowledge.