Assuming I have a custom iProperty pre-existing in my document that starts with an underscore, I am getting an error when setting the iProperties rule.
Rule iProperties As List = {{"_10_DRAWING_NUM", "MyNumber"}} 'for example
If my document doesn't already have the iProperty starting with a underscore, it will create it and have no problems. Has anyone else ran into this?
I believe this is due to the fact that an iProperty starting with an underscore is a special case in Inventor. It basically makes it only accessible by name PropertySet.Item("_PropNameHere") and not by looping through the collection (I haven't figured out where this would be useful).
So my assumption is that the intent function is looping through the collection of properties and comparing the names until it finds it. If it doesn't it is creating it (as it should). If it does exist, it thinks it doesn't exist since it wasn't visible in the collection and then tries to create it, throwing an error since it already exists.
This is a problem because the first time it creates my drawing it will correctly add the iproperty, but when the drawing is modified it will again call iv_PropertyPut and error out.
Obviously the solution is to just get the item by name.
Thoughts?