Skip to content

Commit

Permalink
Update 4.1.7 The 'Merge post processor' feature does now utilize the …
Browse files Browse the repository at this point in the history
…include path if specified
  • Loading branch information
cpsdev committed Dec 13, 2024
1 parent 2165f3e commit ea702b1
Show file tree
Hide file tree
Showing 3 changed files with 14 additions and 6 deletions.
3 changes: 3 additions & 0 deletions vs-code-extension/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -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
Expand Down
15 changes: 10 additions & 5 deletions vs-code-extension/out/src/extension.js
Original file line number Diff line number Diff line change
Expand Up @@ -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.");
}
Expand Down
2 changes: 1 addition & 1 deletion vs-code-extension/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -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",
Expand Down

0 comments on commit ea702b1

Please sign in to comment.