Web.Link - Recursive Save As Workflow
Hi all,
I'm working on a Windchill-integrated template library for Creo Parametric (currently on Creo 8, i am updating to 12). The setup is a web-based app (HTML + JavaScript using Pro/Web.Link) that displays a catalog of assembly templates stored in Windchill and allows users to insert them into an active assembly
The core problem:
When a user selects a template from the catalog, the app needs to do a recursive "Save As" of the entire template hierarchy — renaming every template-owned component to a new order-specific name — before assembling it. This is necessary because each insertion must be independent and order-specific (e.g., MY_PART_0001_CC1234 instead of the original MY_PART_TEMPLATE_CC0000).
In Creo 8 we used a Rename → Save → Rename-back pattern via the API (pfcModel.Rename, pfcModel.Save), which worked well:
- Check out the template root (pulling all children via
CheckoutMultipleObjectswithincludeDependencies = true) - Build a bottom-up dependency graph
- Rename each model to its new target name
- Save all renamed models (creating the new files on disk/Windchill)
- Rename everything back to the original names in session
- Undo-checkout the originals so they are not modified
- Retrieve and assemble the newly saved copies
This approach gives us the copies we need without permanently modifying the templates.
The issue in Creo 12:
With Creo 12, it appears that pfcModel.Rename now requires the model to be checked out from Windchill before renaming in session — even temporarily. This works, but it creates a workflow risk: if anything goes wrong between rename and undo-checkout, the templates are left in a checked-out state and other users are locked out. The undo-checkout cleanup works most of the time, but it feels fragile, especially for assemblies with 20+ dependent models.
More importantly, from a governance perspective, we'd prefer a workflow where the original templates are never checked out at all. They are managed, released designs — we don't want them appearing as modified or locked, even temporarily.
What I've tried / considered:
pfcModel.CopyAndRetrieve— works for single drawing files, but not for recursive assembly hierarchies where child references need updatingExecuteFeatureOps(CreateReplaceOp)— throwsXToolkitBadContextin Creo's default no-resolve mode, so that's a dead end- Windchill server-side copy —
pfcWCSServerhas some object management methods, but I haven't found aCopyAndRenameat the tree level. Is there something in the server API I'm missing? - Save to a local workspace first — might avoid the Windchill checkout requirement, but we lose Windchill tracking
What I'm looking for:
Is there an official or recommended workflow in the toolkits, ideally weblink, for doing a non-destructive recursive copy of an assembly, where:
- The originals are never checked out (or if they must be, are immediately undone with zero modifications)
- The copies are independently stored and named
- The child references within the copies point to the new renamed copies, not the originals
Has anyone implemented something like this via Web.Link or toolkit? Is there a Windchill PDMLink server-side API (OOTB or REST) that handles recursive copy-rename that we could call from the browser side?
Any pointers to the right API surface would be hugely appreciated. Thanks in advance!
BR Philipp

