Page 1 of 1

PDM Merge Set Revision to 0

Posted: Mon May 31, 2021 11:47 am
by UnusedUsername
I messed up using PDM's branch/merge functionality - it seems that the vault hasn't been configured to use the source file's revision variable, so when I merged my files back the revision of all the files went to 0 (the source files rev level used to be between 1 and 4).

We have an "Increment Revision" transition that allows us to bump the revision level up, which I thought I might be able to repair the issue with, but it seems that when I use that, PDM resumes the revision history of the original file and increments from there - if the file is supposed to be Rev 2, the transition takes it to Rev 3.

Does anyone know if there's a straightforward way of making the file reset the variable to where it's supposed to be? It evidently has some available record since it knows what the next rev level is, but for some reason the files are all at rev 0 after the merge.

EDIT: I may have just found the root cause of this... it seems like our vault is for some reason using a secondary variable as a kind of proxy for the revision variable.. The correct revision variable is still stored in the merged files, but there's another "Rev" variable that our drawings are referencing for some weird reason.

Re: PDM Merge Set Revision to 0

Posted: Wed Apr 27, 2022 1:22 pm
by the_h4mmer
From what I recall, the vault uses the "Local Revision" value you can find on the "Version" tab in PDM. That's the "true" revision of the file, if that's not set, the vault (seemingly) doesn't have a Revision (sort of). I found this out when trying to run a task to create PDF of released drawing using the source file revision in the PDF filename, but no value was getting added since there was no Local Version (due to strange circumstances), but if I used the Revision custom variable, that would be added to the filename.

I've been exploring how to set up our vault so that we can choose to keep a branched file separate with a new revision history or merge to maintain the revision history of the original file. I'm guessing that the "Set Revision" function will have to be used, but to use "Reset to" for 'zeroing' the Revision value. The trick (for me) of course being that there needs to be a means to reset for both a numeric and alpha revision value, which I'm guessing means I'll need to make special workflow states and transitions to get functional.

The other means being the User/Group setting (right click on a specific group or user, or right click on Users node) for branching. There you can set what variables are copied or used when Branching. I'm not sure if this acts like a Transition Action, but if it does, it could work to reset the value to whatever you need, but I'd be wary that you might run into the same issue as you mentioned where using %nextrevision% during transitioning will jump values. If you try either, let us know how it goes! I'm hoping I'll have a chance to test it myself in the next week or so...

Re: PDM Merge Set Revision to 0

Posted: Wed Apr 27, 2022 3:08 pm
by bnemec
Interesting this was just talked about this morning in a call with our VAR regarding branch and merge. In short merge copies the branched file (along with its custom properties that might be mapped to data card variables) and the metadata as a new version of the source file. That is why the data card variable Revision is changed. But as you've figured out there's nothing special about a data card variable called Revision or any other name indicating revision. It's just another data card variable, nothing special, we could name the variable "change counter" or "barrel of monkeys". It's likely mapped to a custom property in the file like any other data card variable.

In the back of PDM there's a revision counter, or a couple of them, for each file based on the Revision Numbers node(s) in the PDM Admin Tool. There are just a couple of things that keep the data card variable synchronized with the real rev counter for the file; or try to prevent it from being in sync with the real revision counter. I'll probably miss a couple but try to list them;

- Default value for the data card variable control in the data card variable editor.

- workflow transition action, set variable. Set the data card variable for revision using %revision% or %nextrevision% based on your needs
image.png
- workflow transition Revision Numbers tab -> "reset to" column

- user/group settings for CopyTree or Branch and Merge can set variable values from source or destination etc. (this might be helpful to you) Otherwise merging will change the data card variable for the source file to match the branched file but can do nothing to the actual revision counter for the file in the data base, so next time the data card variable is updated in a transition if will jump, just as you are seeing. Then the admin gets called to go Set Rev to fix the data card variable AND the actual revision counter. Been there done that, hundreds of times!

- if the variable is mapped to a custom file property checking in the file will update the data card variable to match what the custom file properties are. This is where the fun is! Because some savvy users will use custom properties in CAD to "fix" the revision when in fact they've accomplished nothing useful. It's obvious on slddrw files because the properties editor only shows the custom properties that get mapped to the @ tab on data card, the sheet tabs will still show the other revision number.

- Set Rev tool from right click menu, if revisions are controlled by workflow only admins have permission to this. Incidentally this is the only place I know of (outside of looking in SQL) to find out what the real revision counter is at and if it's set to increment on the next IncRevision transition action. There's a check box to update the data card variable. That is only allowed is the file's current state has the "Revision Variable" set in the "Revision Numbers" tab in the state's properties. Otherwise it doesn't know which data card property to update. Again there's nothing magical about a variable with "revision" in it's name. We must tell PDM what variable to use.
image.png
- !!! Transition action IncRevision does NOT change the data card variable. It "stamps" the version with a Revision number and will increment the actual file revision counter in the database IF (and this is where I start to loose grip)
++...if the file has gone through a Transition that as a revision number component selected and "Increment by" set to 1
++ or the source state of the transition that has the IncRevision action has Revision number component selected and increment by 1.
The Revision Number and Revision Component both come from the nodes set in PDM Admin tool
image.png
image.png