From ea702b183809497aa06b1220ccf647baaf8fdec0 Mon Sep 17 00:00:00 2001 From: Achim Nacke Date: Fri, 13 Dec 2024 15:48:59 +0100 Subject: [PATCH] Update 4.1.7 The 'Merge post processor' feature does now utilize the include path if specified --- vs-code-extension/CHANGELOG.md | 3 +++ vs-code-extension/out/src/extension.js | 15 ++++++++++----- vs-code-extension/package.json | 2 +- 3 files changed, 14 insertions(+), 6 deletions(-) diff --git a/vs-code-extension/CHANGELOG.md b/vs-code-extension/CHANGELOG.md index df2b5d0..f8f9837 100644 --- a/vs-code-extension/CHANGELOG.md +++ b/vs-code-extension/CHANGELOG.md @@ -1,4 +1,7 @@ # Change Log +## 4.1.7 +Fixed: + - The 'Merge post processor' feature does now utilize the include path if specified ## 4.1.6 Changed: - Option 'Download CNC exporting post processor' now redirects to the Fusion post library website diff --git a/vs-code-extension/out/src/extension.js b/vs-code-extension/out/src/extension.js index 65d2a8e..6c9bbd4 100644 --- a/vs-code-extension/out/src/extension.js +++ b/vs-code-extension/out/src/extension.js @@ -253,20 +253,25 @@ function showPostEngineVersion() { } } -/** Merges the post processor with any files with the '.merge.cps' extension in the same directory */ +/** Merges the post processor with any files with the '.merged.cps' extension in the same directory */ function mergePost() { checkPostKernel(); let child = require('child_process').execFile; let parameters = []; postFile = getCpsPath(); - var mergeFile = postFile.split(".cps")[0] + ".merge.cps"; + var mergeFile = postFile.split(".cps")[0] + ".merged.cps"; parameters = [postFile, "--merge", mergeFile]; + + let includePath = vscode.workspace.getConfiguration("AutodeskPostUtility").get('includePath'); + if (fileExists(includePath)) { + parameters.push("--include", includePath); // Set the include path + } try { var _timeout = vscode.workspace.getConfiguration("AutodeskPostUtility").get("timeoutForPostProcessing"); _timeout *= 1000; // convert to milliseconds - child(postExecutable, parameters, { timeout: _timeout }, function (err, data) { - if (err) { - errorMessage("Merge failed."); + child(postExecutable, parameters, { timeout: _timeout }, function (err, stdout, stderr) { + if (stderr) { + errorMessage("Merge failed: " + stderr); } else { message("Merge successful. The merged post can be found in your post processors directory."); } diff --git a/vs-code-extension/package.json b/vs-code-extension/package.json index 18634db..e14b493 100644 --- a/vs-code-extension/package.json +++ b/vs-code-extension/package.json @@ -2,7 +2,7 @@ "name": "hsm-post-processor", "displayName": "Autodesk Fusion Post Processor Utility", "description": "Post processor utility.", - "version": "4.1.6", + "version": "4.1.7", "icon": "res/icons/logo.png", "author": { "name": "Autodesk",