Hello,
I'm trying to retrieve the PDM version number and write it in a custom property. This seems like a basic task, but it turns out to be more complex than expected in PDM.
What I’ve done so far
- I created a variable in PDM and added it to my data cards, since (surprisingly) this variable doesn’t exist by default.
- I then set up an action in the workflow to write the version number using
%version%during state transitions. - To handle the incorrect version shown when a file is checked out, I attempted a workaround using Dispatch:
- I used an incremental expression:
Add(%CurrentVersionOfFile%, 1) - The idea was to anticipate the version number that will be assigned during check-in.
- I used an incremental expression:
The issue
This workaround works sometimes, but not consistently.
I suspect the problem may come from:
- Automatic transitions with "Overwrite existing versions of files"
- Or the "Rollback to an earlier version" feature in the history
Additional context
I'm still quite new to Dispatch, so it's possible I made a mistake in my setup.
My question
Is there a more reliable or standard way to retrieve the PDM version number and write it in a custom property?
I need this version number to properly identify exported files (.pdf, .stp, .dxf).
Thanks in advance for your help!
