cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
Showing results for 
Search instead for 
Did you mean: 

Community Tip - Did you get called away in the middle of writing a post? Don't worry you can find your unfinished post later in the Drafts section of your profile page. X

Unable to change version label of existing cad documents

ZC_10909252
8-Gravel

Unable to change version label of existing cad documents

I am using windchill 12.1. I needed to add a "-" revision to my versioning scheme. I updated the versioning scheme for EPM documents using the wt.series.LoadFileBasedSeries utility. Everything seemed to load fine. I was able to update the OIR to use the new versioning scheme. 

I created a new CAD document. When i try to use the wt.vc.ChangeRevisionLabelUtility with the new cad document I have no problem changing the versions from A to - to 1 etc. 

 

However when I try to do the same to an preexisting cad document I am unable to make the change and get an error saying the revision value is not valid within the series. I am guessing it is because the cad document was made prior to changing the versioning adjustment. Is there a way I can set older documents to use the new versioning scheme?

ACCEPTED SOLUTION

Accepted Solutions

Hi @ZC_10909252 

It is really not recommended to modify existing revision schema, and also it is not recommended to change the revision schema on existing data.

 

Why is it not recommended? you can see a reason on your example that it does not work on old objects that have old information about the revisions.

 

The ChangeRevisionLabelUtility can not help with the changing schema. It just change revision of the existing object. 

The point is that there is an internal revision order number (sortID), and the utility does not touch this sortID, and if you change the schema then the order does not apply anymore to existing versions. 

You have to correct it. 

 

I did this revision change many times directly in the database.

Something like: I changed revision schema "MYFIRSTSCHEMA" to "MYNEW" revision schema.

Then you have to change all the revisions on existing objects. Sure I did the change from an alphabetic "A" to a number "1" so it was not so hard to change all alphabet chars to numbers. 

 

But after change, there was wrong revision order and this order has to be repaired. 

 

here is an example how I changed the revision labels

UPDATE
    [wcuser].[wcuser].[EPMDocument]
SET
    [wcuser].[wcuser].[EPMDocument].versionIdA2versionInfo = '1',
    [wcuser].[wcuser].[EPMDocument].versionSortIdA2versionInfo = sortId
FROM
    [wcuser].[wcuser].[SeriesSortValue] AS SeriesSortValueTable
    INNER JOIN [wcuser].[wcuser].[EPMDocument] AS EPMDocumentTable
    ON SeriesSortValueTable.[value]='1' AND SeriesSortValueTable.uniqueSeriesName= 'wt.series.HarvardSeries.Statebase'
WHERE EPMDocumentTable.versionIdA2versionInfo = 'A';

 

here is an example how to change revision schema on a object from HarvardSeries to StateBased (all epmDocuments)

UPDATE wcuser.wcuser.EPMDocumentMaster
SET series='wt.series.HarvardSeries.StateBased'
where series='wt.series.HarvardSeries'

 

The most important thing. 

You have to run RevisionLabelCleanser utility to repair the sortID

CS307737 - How to resolve incorrect version IDs reported in "Revision Sequence Corruption Report" in Windchill

 

java wt.vc.RevisionLabelCleanser -update

 

Hope this can help.

 

PetrH

View solution in original post

2 REPLIES 2

Hi @ZC_10909252 

It is really not recommended to modify existing revision schema, and also it is not recommended to change the revision schema on existing data.

 

Why is it not recommended? you can see a reason on your example that it does not work on old objects that have old information about the revisions.

 

The ChangeRevisionLabelUtility can not help with the changing schema. It just change revision of the existing object. 

The point is that there is an internal revision order number (sortID), and the utility does not touch this sortID, and if you change the schema then the order does not apply anymore to existing versions. 

You have to correct it. 

 

I did this revision change many times directly in the database.

Something like: I changed revision schema "MYFIRSTSCHEMA" to "MYNEW" revision schema.

Then you have to change all the revisions on existing objects. Sure I did the change from an alphabetic "A" to a number "1" so it was not so hard to change all alphabet chars to numbers. 

 

But after change, there was wrong revision order and this order has to be repaired. 

 

here is an example how I changed the revision labels

UPDATE
    [wcuser].[wcuser].[EPMDocument]
SET
    [wcuser].[wcuser].[EPMDocument].versionIdA2versionInfo = '1',
    [wcuser].[wcuser].[EPMDocument].versionSortIdA2versionInfo = sortId
FROM
    [wcuser].[wcuser].[SeriesSortValue] AS SeriesSortValueTable
    INNER JOIN [wcuser].[wcuser].[EPMDocument] AS EPMDocumentTable
    ON SeriesSortValueTable.[value]='1' AND SeriesSortValueTable.uniqueSeriesName= 'wt.series.HarvardSeries.Statebase'
WHERE EPMDocumentTable.versionIdA2versionInfo = 'A';

 

here is an example how to change revision schema on a object from HarvardSeries to StateBased (all epmDocuments)

UPDATE wcuser.wcuser.EPMDocumentMaster
SET series='wt.series.HarvardSeries.StateBased'
where series='wt.series.HarvardSeries'

 

The most important thing. 

You have to run RevisionLabelCleanser utility to repair the sortID

CS307737 - How to resolve incorrect version IDs reported in "Revision Sequence Corruption Report" in Windchill

 

java wt.vc.RevisionLabelCleanser -update

 

Hope this can help.

 

PetrH

Thanks that helps. When windchill was set up here the revision schema was not set to align with the business and the revisions were not/are not being used so most things are out of alignment with the business. 

Announcements


Top Tags