Windchill does not currently allow interaction or modification of the primary content file's <file_name> in an Object Initialization Rule (OIR) when creating a new WTDocument. I would like to be able to read, modify and change this value in an OIR.
Comparing WTDocument to EPMDocument, you can see many more capabilities available for EPMDocument vs. WTDocument (such as File Name). Where feasible, the attributes, layouts and capabilities for these two type of object should be as similar as possible.
I have a few examples to demonstrate the need.
Read the file name, process with regex, assign OIR attributes and assign object attributes. This would be a good way to pull a business number (PO, SO, etc.) from a document's file name and automatically populate an attribute with a value vs. requiring the user to enter it manually.
When changing the Document Name in an OIR, it would be nice to also rename the primary content <file_name> to match the Document Name defined in the OIR.
If the primary content's <file_name> does not match the Document Name, it can be difficult to work with the documents outside of Windchill since they will not be listed or displayed in the same way.
Someone may have work-arounds or customizations to support this, so please comment if you do. I would be interested to hear or any alternate ways to achieve these use cases.