Community Tip - You can change your system assigned username to something more personal in your community settings. X
Does anyone know of a way to set the versioning series of a Part to do the following.
Start a ProE part in Prototype at 1.1 then when that part gets released it goes to A.1 without using the revise function.
So what I did at a previous customer was to use the State Based lifecycle, but we put in a state before Released, call it Release to Production or something like that. In this example we used a Promotion process to get it to this Release to Production state, whose versioning series was different Mil Std. I then had an expression robot that had the following code that was provided to me by a person from PTC, non-supported of course. The transition in the lifecycle was such that when you revised from the RTP state it went to their Released or Production state. This was all automated through the Promotion workflow.
I'm sure this could be done through an ECN process as well, the code below would need to be slightly changed to grab the ECN's affected objects instead of the Promotion Notices objects. Then you would probably need to add the newly revised objects to the Resulting data of the ECN.
Steve D.
wt.vc.Versioned versionedObj = null;
wt.fc.WTObject obj = null;
wt.maturity.PromotionNotice pn = (wt.maturity.PromotionNotice) primaryBusinessObject;
wt.util.WTProperties props;
try
{
props = wt.util.WTProperties.getLocalProperties();
VERBOSE = props.getProperty("wt.maturity.verbose", VERBOSE);
}
catch (java.io.IOException e1)
{
e1.printStackTrace();
}
try
{
wt.fc.QueryResult queryresult = wt.maturity.MaturityHelper.service.getPromotionTargets(pn);
wt.fc.collections.WTCollection mycollection = new wt.fc.collections.WTArrayList();
mycollection.addAll(queryresult);
//Multi-revise all objects
wt.fc.collections.WTValuedMap versionMap = wt.vc.VersionControlHelper.service.newVersions(mycollection);
/*NOT COMPLETE: Set user of the new objects
Example:Iterated part = VersionControlHelper.assignIterationCreator( thePart, theNewCreator );
*/
wt.fc.collections.WTCollection versionscollection = versionMap.wtValues();
//NOT COMPLETE: Set folder, by checking the value of the folder for the original object
/*if(versioned instanceof Foldered)
{
Folder folder = ......
FolderHelper.assignLocation((FolderEntry)versioned1, folder);
}
*/
//Save new versions
wt.fc.PersistenceHelper.manager.store(versionscollection);
}
catch (Exception me)
{
if(VERBOSE)
me.printStackTrace();
}
In Reply to Charlie Jones:
Does anyone know of a way to set the versioning series of a Part to do the following.
Start a ProE part in Prototype at 1.1 then when that part gets released it goes to A.1 without using the revise function.