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

Community Tip - You can Bookmark boards, posts or articles that you'd like to access again easily! X

How to change Type of EPMDocument type in batch mode?

rkumar-10
5-Regular Member

How to change Type of EPMDocument type in batch mode?

Hi

We have some EPMDocuments as "DefaultEPMDocument" type in a Particular Library.

How we can change all the data in this particular library to some other SubType, say "StandardPartType"

As of now i can change one item at a time using "wt.epm.util.SoftTypeChangeUtility"

1. how can i change items of a particular library in batch mode?

2. how can i pass username password in single document mode command itself?

Thank you.

//Rakesh

10 REPLIES 10

Hi Rakesh,

Go to the PTC Knowledge Base for Windchill and look up "ChangeTypeSql".  This is a simple java class that you can request and install on your Windchill system that you can use to change the soft type of any object within Windchill.  You cannot change from one modeled type to another but you can change soft types.  For example you can change a WTDocument to a ReferenceDocument but you cannot change an EPMDocument to a WTPart.

Hope It Helps,

Patrick Williams

rkumar-10
5-Regular Member
(To:pwilliams-3)

Hi Patrick

Document - CS52368

  • This utility is not support for EPMDocuments and subtypes as using this tool might cause data corruption.
  • Use the wt.epm.util.SoftTypeChangeUtility instead.

//Rakesh

N-Pyn
13-Aquamarine
(To:rkumar-10)

Hi Rakesh,

Did you find a way to do this? I'm struggling with the same problem myself.

I need to change the Subtype of all the EPMDocuments except the ones in a particular library. More specifically, I need to change all the Solidworks CAD Documents to new Subtype except Solidworks Toolbox CAD documents which are in their own library. If there was a way to change the type of objects in a specific context I could change all objects to the new type and then change only the Toolbox library back to the original type.

There is also a single document mode, where you need to enter the CAD name.

See Single Document Mode 

With this option you could change all the Toolbox CAD Documents to another subtype, change all the rest and move the others back to the current one. The easiest way is to create a query builder report with the CADName and process all of them.

If you have thousands of toolbox documents, the runtime could be the problem for single mode.

N-Pyn
13-Aquamarine
(To:BjoernRueegg)

Hi Björn,

The problem with the single document mode is that it asks for login in a popup every time the tool is run. So even if I made a batch script for going through all the CAD files, it seems that I would need to re-enter the login info for each object being processed.

Oh that's not good. I checked quick the source code and it doesn't seem to work to add -u and -p as argument.

The only solution I can think of is to create a wrapper for the tool, so you can pass the user and password as argument.

I would suggest to open up a case and hope, the support can help you 🤨

mmeadows-3
14-Alexandrite
(To:BjoernRueegg)

Have you tried this workaround?

https://www.ptc.com/en/support/article/CS63015

 

N-Pyn
13-Aquamarine
(To:mmeadows-3)

That works! Thank you!

Is it possible to somehow give multiple "single documents" to SoftTypeChangeUtility or do I need to create a batch file which runs the command repeatedly with all the objects?

That's good news. 

I would create a batch file. That's the easiest way.

N-Pyn
13-Aquamarine
(To:BjoernRueegg)

So I read the documentation a bit more carefully and realized that you can in fact define Document Categories and Subcategories of the objects you want to change in the batch mode. The documentation talks confusingly about EPMDocumentType and EPMDocumentSubType so I thought that they really just mean Document Types and Document Subtypes. Not the first time when PTC's naming policy causes confusion, and probably not the last..

Because the Subcategory of the Toolbox parts is "Library part", I could just use the batch mode and change the type of all the other subcategories except "Library part". Now my files are in correct type! Thanks Björn!

A little problem though: The batch change also converted all the default Solidworks templates, which are found in the Site context. I tried to change them back to the default type with the tool, but it seems that it doesn't find objects in that context. I tried to define the context "Site" in the tool input but it didn't work.

But that doesn't really matter because those default templates are next to useless and I can just delete them. 🙂

Top Tags