Community Tip - Learn all about the Community Ranking System, a fun gamification element of the PTC Community. X
I think this has been knocked around a bit already but, does anyone know if this is possible?
We are about to upload over 3k documents from WC9 into WC10.
In WC10 I have created a lot more document types and sub-types and my guess is that someone will say that a document or two should be changed to a different type (after its imported).
Other than creating the document again, it would be helpful to just change the type.
You might be able to change it after thru the DB.
This is not the correct way of achieving this requirement. Direct database updation/modification is not supported by PTC.
As Ben mentioned you can use "ChangeTypeSql" command line utility. This is supported way.
Also as Paul mentioned, you can then use "Reassign Lifecycle Command Line Utility". This will help ypu doing this:
http://support.ptc.com/cs/help/windchill_hc/wc102_hc/index.jspx?id=LCTempCommandUtilRun&action=show
Indeed this has been kicked around several times. It is covered best with PTC documents CS7287 and CS52368. They basically say the same thing.
CS7287 is the preferred source. There are .class files that need to be downloaded and put into your codebase if you haven't already done it at some other point in time.
Note that the output from the tool will give you database command(s) that will change all objects from one type to another type. If that is not your intention, then you'll need to modify the command(s) before executing them. For example, I joined in the WTDOCUMENTMASTER table so that I could input specific WTDOCUMENTNUMBER values. An example is below.
--Update WTDocs from any type to "EATS Document" type
drop table wtdocument_bak;
create table wtdocument_bak as select * from wtdocument;
UPDATE WTDocument b
SET branchIdA2typeDefinitionRefe = 512941047, idA2typeDefinitionReference = 514725322
WHERE exists
(select *
from wtdocumentmaster a
where b.ida3masterreference=a.ida2a2 and a.WTDOCUMENTnumber like 'EATS%'
);
commit;
We have used the mechanism Ben has described several times with lots of success, one catch that may or may not apply is that if the two types have differing lifecycles this does not reassign lifecycles as it re-types them. We usually just use the Reassign lifecycle function in the UI to sort that out.
This is not the correct way of achieving this requirement. Direct database updation/modification is not supported by PTC.
As Ben mentioned you can use "ChangeTypeSql" command line utility. This is supported way.
Also as Paul mentioned, you can then use "Reassign Lifecycle Command Line Utility". This will help ypu doing this:
http://support.ptc.com/cs/help/windchill_hc/wc102_hc/index.jspx?id=LCTempCommandUtilRun&action=show
Somewhat an old thread already, but...
Article CS7287 says about the change type utility:
"Not supported for converting Reference Document to any other Document type
As it happens, basically all our docs are linked as Reference Documents.
Is there any way to work around this and change the Type of specific documents?