add old revision number to copy tree/branch
-
- Posts: 423
- Joined: Tue Mar 09, 2021 10:11 am
- x 439
- x 233
add old revision number to copy tree/branch
Is it possible to copy over the old revision number from the old part/assembly/drawing to the new drawing?
We would like to have a 'Replaced [part #].[revision #]' automatically filled out in our drawings.
The title block would say:
Replaced 123456.07
It's easy to add the 123456 in there - but we could not find any option to copy over the revision #. Am I missing something?
We would like to have a 'Replaced [part #].[revision #]' automatically filled out in our drawings.
The title block would say:
Replaced 123456.07
It's easy to add the 123456 in there - but we could not find any option to copy over the revision #. Am I missing something?
Bad description on my part. That state is not specific to CopyTree or Branch; any new file that goes to that workflow when added to the vault goes to this state. CopyTree and Brach create new files in the vault just like Save from SW.berg_lauritz wrote: ↑Thu Oct 21, 2021 3:35 pm So you insert a state after copy tree/branch? How do you do that? Am I slow on the uptake here?
That "Initiated" state is the one in the workflow that has "Initial state" checked: I mentioned this because I know that's not unique to our setup and which ever operation edits the data card variable last wins.
So there's the Default Value set according to the Data Card Editor. Then any transition(s) that the new files go through when added to the vault that might have an action to set the variable.
There's also the user/group settings for Branch CopyTree where you can set variables to some values, I don't know that you can pull data card variables here though. In screen shot you can grab the source filename without extension for example. in our case that's just a serial number, not part number, so of less help. Thing is, I don't know off the top of my head when this action happens. I want to guess that it's before the file is added, so it's before the default value from data card editor but don't take my word for it. I'm just trying to explain that if a variable is being set in more than one place, the last one wins. I hope this is helpful.
- VicFrauenfeld
- Posts: 85
- Joined: Fri Mar 12, 2021 9:27 am
- Location: Cleveland, Wisconsin USA
- x 82
- x 78
Re: add old revision number to copy tree/branch
Sorry I cannot answer your question. But you say that it is easy to add the part number to the copied or branched file. How did you accomplish that?
Be quick to listen, slow to speak and slow to become angry.
Re: add old revision number to copy tree/branch
There's a way to do it for any data card variable by adding extra (likely hidden) data card variables that are duplicates of the part number and revision for example. Then on CopyTree or Branch (can also be used to help make metadata correct in a Merge I think) you can set data card variables by user group settings. I had started this to have the supersedes data like you mention, but got bogged down and other squirrels ran by and I've not gotten back to it.
The trick is getting the timing right between using proper default values for the variable control on the data card (affects all new files) which IIRC over writes the existing data when copying a file. Then in our workflow all CAD files enter the workflow through an initiated state just for the sake of an automatic transition to WIP that we can set filters and actions on. So data card variables can be set here as well. Again, IIRC this is where the duplicate part number and revision variables come in because they were not changed by default values. I wish I could remember the exact process. Maybe I should just keep quiet until I find my old notes...
The trick is getting the timing right between using proper default values for the variable control on the data card (affects all new files) which IIRC over writes the existing data when copying a file. Then in our workflow all CAD files enter the workflow through an initiated state just for the sake of an automatic transition to WIP that we can set filters and actions on. So data card variables can be set here as well. Again, IIRC this is where the duplicate part number and revision variables come in because they were not changed by default values. I wish I could remember the exact process. Maybe I should just keep quiet until I find my old notes...
-
- Posts: 423
- Joined: Tue Mar 09, 2021 10:11 am
- x 439
- x 233
Re: add old revision number to copy tree/branch
We use PDM Professional & you can actually select the variable in the Administration of PDM & just copy it over into a custom property. You then link the custom property to a title block field i.e. & you have a replaced in there.VicFrauenfeld wrote: ↑Thu Oct 21, 2021 2:09 pm Sorry I cannot answer your question. But you say that it is easy to add the part number to the copied or branched file. How did you accomplish that?
The variable name is:
Code: Select all
File name without extension
-
- Posts: 423
- Joined: Tue Mar 09, 2021 10:11 am
- x 439
- x 233
Re: add old revision number to copy tree/branch
So you insert a state after copy tree/branch? How do you do that? Am I slow on the uptake here?bnemec wrote: ↑Thu Oct 21, 2021 2:19 pm There's a way to do it for any data card variable by adding extra (likely hidden) data card variables that are duplicates of the part number and revision for example. Then on CopyTree or Branch (can also be used to help make metadata correct in a Merge I think) you can set data card variables by user group settings. I had started this to have the supersedes data like you mention, but got bogged down and other squirrels ran by and I've not gotten back to it.
The trick is getting the timing right between using proper default values for the variable control on the data card (affects all new files) which IIRC over writes the existing data when copying a file. Then in our workflow all CAD files enter the workflow through an initiated state just for the sake of an automatic transition to WIP that we can set filters and actions on. So data card variables can be set here as well. Again, IIRC this is where the duplicate part number and revision variables come in because they were not changed by default values. I wish I could remember the exact process. Maybe I should just keep quiet until I find my old notes...
Re: add old revision number to copy tree/branch
Bad description on my part. That state is not specific to CopyTree or Branch; any new file that goes to that workflow when added to the vault goes to this state. CopyTree and Brach create new files in the vault just like Save from SW.berg_lauritz wrote: ↑Thu Oct 21, 2021 3:35 pm So you insert a state after copy tree/branch? How do you do that? Am I slow on the uptake here?
That "Initiated" state is the one in the workflow that has "Initial state" checked: I mentioned this because I know that's not unique to our setup and which ever operation edits the data card variable last wins.
So there's the Default Value set according to the Data Card Editor. Then any transition(s) that the new files go through when added to the vault that might have an action to set the variable.
There's also the user/group settings for Branch CopyTree where you can set variables to some values, I don't know that you can pull data card variables here though. In screen shot you can grab the source filename without extension for example. in our case that's just a serial number, not part number, so of less help. Thing is, I don't know off the top of my head when this action happens. I want to guess that it's before the file is added, so it's before the default value from data card editor but don't take my word for it. I'm just trying to explain that if a variable is being set in more than one place, the last one wins. I hope this is helpful.
- jcapriotti
- Posts: 1852
- Joined: Wed Mar 10, 2021 6:39 pm
- Location: The south
- x 1196
- x 1984
Re: add old revision number to copy tree/branch
You can't pull and pass a variable......only the built in system variables which is really limiting.
I think it's possible to do this with Dispatch and a workflow. Dispatch can get a variable, store it, and pass it. Downside is the copy will have the old information for at least a version or two which can mess up searches depending on how you use it.
Jason
-
- Posts: 423
- Joined: Tue Mar 09, 2021 10:11 am
- x 439
- x 233
Re: add old revision number to copy tree/branch
This is extremely helpful. We have some of those states in between already but it somehow slipped our minds to start with one. This is exactly what we will do after we test some things. Thank you @bnemec ! This forum is just awesome for those questions, I really appreciate all of the input all the time.bnemec wrote: ↑Thu Oct 21, 2021 5:46 pm Bad description on my part. That state is not specific to CopyTree or Branch; any new file that goes to that workflow when added to the vault goes to this state. CopyTree and Brach create new files in the vault just like Save from SW.
image.png
That "Initiated" state is the one in the workflow that has "Initial state" checked:
image.png
I mentioned this because I know that's not unique to our setup and which ever operation edits the data card variable last wins.
So there's the Default Value set according to the Data Card Editor.
image.png
Then any transition(s) that the new files go through when added to the vault that might have an action to set the variable.
There's also the user/group settings for Branch CopyTree where you can set variables to some values, I don't know that you can pull data card variables here though. In screen shot you can grab the source filename without extension for example. in our case that's just a serial number, not part number, so of less help. Thing is, I don't know off the top of my head when this action happens. I want to guess that it's before the file is added, so it's before the default value from data card editor but don't take my word for it. I'm just trying to explain that if a variable is being set in more than one place, the last one wins.
image.png
I hope this is helpful.