Community Tip - Have a PTC product question you need answered fast? Chances are someone has asked it before. Learn about the community search. X
For Creo Parametric, I would like to store the "Controlled" versions of files in Windchill (Primarily things like symbols and manikin configuration files) but have Windchill do a nightly or hourly write of those files to shared network locations so that the common Robocopy method can be used to pull the files to the users local machines. (Creo has slow down issues when reading symbols and manikin poses from Windchill directly). Is this possible? Can I be pointed to the correct terminology or relevant help files.
Even better would be if there is a way for Windchill to update the users local Creo Parametric files without needed to use RoboCopy. Thanks for any help or direction.
(Using Creo 9 and Windchill 12. But should be moving to W13 soon)
Solved! Go to Solution.
Hello @N.Barnes
Definitely you need a configuration and customization knowledge.
It is not so hard to explain buy you need someone who can apply a code to the workflow and also who knows a risk of the code.
For example if you use a code downloaded from PTC it is save to use, but if you do not understand the code, it is hard to recognize if there is everything alright 😄
An example how to download a file to a network/server disk is shown in a AfterEDRloader
CS216668 - An example Afterloader hook method
a section Optionally download a copy of the EPM Document's attachments
this is just snip of code for the downloading from the AfterEDRloader class provided by PTC.
If you get primary file then you can do it same way - get Primary - get primary ApplicationData save it to the drive on the server...
String directory = "";
if (downloadToLocal)
{
// get epmDoc info
// String container = WTContainerHelper.getContainer(epmDoc).getName();
// String authapp = epmDoc.getAuthoringApplication().toString();
// String epmdocType = epmDoc.getDocType().toString();
String localDir = getDownloadToLocalDir();
if (localDir.equals(""))
{
downloadToLocal = false;
} else
{
SimpleDateFormat fm = new SimpleDateFormat("yyyy-MM");
// File dir = new File(localDir + File.separator + "Design_deliverables" + File.separator + container + File.separator + authapp + File.separator + epmdocType + "_" + fm.format(Calendar.getInstance().getTime()));
File dir = new File(localDir + File.separator + fm.format(Calendar.getInstance().getTime()));
if (dir == null || !dir.exists())
{
dir.mkdirs();
}
directory = dir.getAbsolutePath();
}
}
public static String downloadContent(EPMDocument epmDoc, ApplicationData appData, String dir, String fromFileName, String toFileName)
{
String ret = "";
try
{
// Download ApplicationData
File contentFile = FileHelper.getFileContent(epmDoc, appData, dir, null);
if (!fromFileName.equalsIgnoreCase(toFileName))
{
FileUtil.moveFile(dir, fromFileName, toFileName);
}
ret = contentFile.toString();
System.out.println("downloadContent..." + ret);
} catch (Exception e)
{
e.printStackTrace();
}
return ret;
}
the code could be used in own class and then call it from workflow or
the code can be modified for the direct workflow expression robot and use it directly in the WF. WF expression has limit to 4k characters so you can not write long code in the wf expression .
PetrH
Hi N.Barnes,
Thank you for your question.
I’d like to recommend to bring more details and context to your initial inquiry. It also helps to have screenshot(s) to better understand what you are trying to do in your process.
This will increase your chances to receive meaningful help from other Community members.
Regards,
Community moderation team.
A lot of extra work for very little gain!
All of our symbols, material files and ModelCheck configuration files are stored on a network drive. I do not notice any delay when adding a symbol to our drawings or changing material properties. Creo is also loaded on the network drive. There is a little delay in launching Creo, but it is livable. When I do an upgrade to Creo, I install it once on the network drive, change a few lines in my Creo Launch script to point to the new loadpoint and the users now have the new version the next time they launch Creo.
Ben, I agree. Before remote support became using a common network location was great. Due to some users access the network though VPN's and remote locations with inconsistent speed the remote files are less attractive now.
Hi @N.Barnes
You can write a code that can store the files to the shared network location on the server.
I can imagine that you can create simple workflow, for the CAD Objects that you need to store to the network location and run the workflow if the CAD Objets are released.
PetrH
PetrH,
Is there any additional information you're able to provide to help me get the wheels turning. Are there some examples or help files I can reference? Are any special Windchill modules required? (Please accept my apologies if this is so elementary that its hard to explain. My experience is mostly being a Creo Parametric user looking to get some insight so that I can speak with my Windchill admins intelligently.)
Thanks
Nick.
Hello @N.Barnes
Definitely you need a configuration and customization knowledge.
It is not so hard to explain buy you need someone who can apply a code to the workflow and also who knows a risk of the code.
For example if you use a code downloaded from PTC it is save to use, but if you do not understand the code, it is hard to recognize if there is everything alright 😄
An example how to download a file to a network/server disk is shown in a AfterEDRloader
CS216668 - An example Afterloader hook method
a section Optionally download a copy of the EPM Document's attachments
this is just snip of code for the downloading from the AfterEDRloader class provided by PTC.
If you get primary file then you can do it same way - get Primary - get primary ApplicationData save it to the drive on the server...
String directory = "";
if (downloadToLocal)
{
// get epmDoc info
// String container = WTContainerHelper.getContainer(epmDoc).getName();
// String authapp = epmDoc.getAuthoringApplication().toString();
// String epmdocType = epmDoc.getDocType().toString();
String localDir = getDownloadToLocalDir();
if (localDir.equals(""))
{
downloadToLocal = false;
} else
{
SimpleDateFormat fm = new SimpleDateFormat("yyyy-MM");
// File dir = new File(localDir + File.separator + "Design_deliverables" + File.separator + container + File.separator + authapp + File.separator + epmdocType + "_" + fm.format(Calendar.getInstance().getTime()));
File dir = new File(localDir + File.separator + fm.format(Calendar.getInstance().getTime()));
if (dir == null || !dir.exists())
{
dir.mkdirs();
}
directory = dir.getAbsolutePath();
}
}
public static String downloadContent(EPMDocument epmDoc, ApplicationData appData, String dir, String fromFileName, String toFileName)
{
String ret = "";
try
{
// Download ApplicationData
File contentFile = FileHelper.getFileContent(epmDoc, appData, dir, null);
if (!fromFileName.equalsIgnoreCase(toFileName))
{
FileUtil.moveFile(dir, fromFileName, toFileName);
}
ret = contentFile.toString();
System.out.println("downloadContent..." + ret);
} catch (Exception e)
{
e.printStackTrace();
}
return ret;
}
the code could be used in own class and then call it from workflow or
the code can be modified for the direct workflow expression robot and use it directly in the WF. WF expression has limit to 4k characters so you can not write long code in the wf expression .
PetrH