I'm trying to map a property to the "sheet size" parameter within Inventor .idw files. I would like the sheet size to show up as a property in the Vault. I am unable to browse to this property during the mapping process. Is there anyway to add this property to the list?
Solved! Go to Solution.
Create an iLogic rule using the code below:
iProperties.Value("Custom", "Sheet Size")= ActiveSheet.Size
Either set it as an external rule or save it into your template. Either way you will need to set the event trigger (i.e: before save) in your template. Then create a UDP in vault and map it to the custom property in the Template.
voila! I hope that does what you need.
It seems to be quite a nice solution too!
I wasn't sure if I worded the question well enough for anyone to understand the problem.
I'm using in internal rule. I'm trying to decide if there is an advantage to using an external rule. The event trigger has to be within template either way, correct?
I don't like using internal rules for the same reason using document based VBA macros is a bad idea. They're difficult to manage over time as things change & a few other reasons.
I use External rules so then I can change it across the board without having to use the iLogic code injector each time across thousands of files.
I personally think having event triggers solely in the document is stupid as well. They should be in the project file and/or in the application options, with a parent child relationship. Parent>Child : Project>Application in the same way it works with styles & templates etc.
I would suggest using External rules unless the rules are being written for a very specific set of files.
I have another similar question. I want to grab a custom property from a part or assembly file, (in this case EDP No) and store it my drawing file as a custom property for use with Vault. The line I tried below as a rule in my drawing does work, but needs a variable in place of the "test.ipt" in order to work properly from a template.
iProperties.Value("Custom", "EDP Number")= iProperties.Value("test.ipt", "Custom", "EDP NO")
I have tried bringing this across by copying iproperties from the model in the drawing, but they don’t seem to update well.
Is there a way to make this work with a rule in my drawing template?
I was able to make this work with the following:
modelName = IO.Path.GetFileName(ThisDrawing.ModelDocument.FullFileName)
iProperties.Value ("Custom", "EDP NO") = iProperties.Value (modelName, "Custom", "EDP NO")
It gives an error when you save the template because there is no part or assembly associated with the drawing. But it does allow you to save the template. It works fine once the template is in use with a part. You must set an event trigger, I again used "Before Save Document". The value does not transfer until you save the drawing with the part or asssembly in it.
Start with some of our most frequented solutions to get help installing your software.
Upgrading to a 2015 product? Make sure to check these out 1st!