File Copy
The VB API provides you with the capability of copying a file from the workspace or target folder to a location on the disk and vice-versa.
Methods Introduced:
Use the method IpfcBaseSession.CopyFileToWS() to copy a file from the disk to the workspace. The file can optionally be added as secondary content to a given workspace file. If the viewable file is added as secondary content, a dependency is created between the Creo Parametric model and the viewable file.
Use the method IpfcBaseSession.CopyFileFromWS() to copy a file from the workspace to a location on disk.
When importing or exporting Creo Parametric models, PTC recommends that you use methods IpfcBaseSession.ImportToCurrentWS() and IpfcBaseSession.ExportFromCurrentWS(), respectively, to perform the import or export operation. Methods that copy individual files do not traverse Creo Parametric model dependencies, and therefore do not copy a fully retrievable set of models at the same time.
Additionally, only the methods IpfcBaseSession.ImportToCurrentWS() and IpfcBaseSession.ExportFromCurrentWS() provide full metadata exchange and support. That means IpfcBaseSession.ImportToCurrentWS() can communicate all the Creo Parametric designated parameters, dependencies, and family table information to a PDM system while IpfcBaseSession.ExportFromCurrentWS() can update exported Creo Parametric data with PDM system changes to designated and system parameters, dependencies, and family table information. Hence PTC recommends the use of IpfcBaseSession.CopyFileToWS() and IpfcBaseSession.CopyFileFromWS() to process only non-Creo Parametric files.
Was this helpful?