diff --git a/Autodesk_Setup_BIDC/setup-sheet.cps b/Autodesk_Setup_BIDC/setup-sheet.cps index e9b5b2d..bebf6aa 100644 --- a/Autodesk_Setup_BIDC/setup-sheet.cps +++ b/Autodesk_Setup_BIDC/setup-sheet.cps @@ -156,6 +156,10 @@ properties = { } }; +var staticProperties = { + postVersion: "BIDC-NGC.G10.K21" +} + var showToolpath = false; var useToolNumber = true; @@ -405,7 +409,7 @@ function onOpen() { c += ""; c += script; if (programName) { - c += "" + localize("Setup Sheet for Program") + " " + programName + ""; + c += "" + getGlobalParameter("document-path") + ""; } else { c += "" + localize("Setup Sheet") + ""; } @@ -414,7 +418,7 @@ function onOpen() { write(""); if (programName) { - write("

" + localize("Setup Sheet for Program") + " " + programName + "

"); + write("

" + getGlobalParameter("document-path") + ": " + programName + "

"); } else { write("

" + localize("Setup Sheet") + "

"); } @@ -490,6 +494,13 @@ function getCoolantDescription(coolant) { } } +var offsetMapping = { + 0: "G54", + 1: "G54", + 2: "G55", + 3: "G56", +} + /** Formats WCS to text. */ function formatWCS(id) { /* @@ -501,7 +512,7 @@ function formatWCS(id) { } return "G" + (getAsInt(id) + 53); */ - return "#" + id; + return "#" + id + " (" + offsetMapping[id] + ")";; } function isProbeOperation(section) { @@ -1264,19 +1275,21 @@ function onSectionEnd() { if (isFirstSection()) { var c = ""; - c += makeRow(makeColumn(d(localize("User") + ": ") + v(getGlobalParameter("username")))); - c += makeRow(makeColumn(d(localize("Date") + ": ") + v(getGlobalParameter("generated-at")))); + c += makeRow(makeColumn(d(localize("User Name: ")) + v(getGlobalParameter("username")))); + c += makeRow(makeColumn(d(localize("Date: ")) + v(getGlobalParameter("generated-at")))); + c += makeRow(makeColumn(d(localize("Post Version: ")) + v(staticProperties.postVersion))); + if (programComment) { c += makeRow(makeColumn(d(localize("Program Comment") + ": ") + v(programComment))); } - if (hasParameter("job-description")) { - var description = getParameter("job-description"); - if (description) { - c += makeRow(makeColumn(d(localize("Job Description") + ": ") + v(description))); - } - } + // if (hasParameter("job-description")) { + // var description = getParameter("job-description"); + // if (description) { + // c += makeRow(makeColumn(d(localize("Job Description") + ": ") + v(description))); + // } + // } if (hasParameter("iso9000/document-control")) { var id = getParameter("iso9000/document-control"); @@ -1285,21 +1298,21 @@ function onSectionEnd() { } } - if (getProperty("showDocumentPath")) { - if (hasParameter("document-path")) { - var path = getParameter("document-path"); - if (path) { - c += makeRow(makeColumn(d(localize("Document Path") + ": ") + v(pageWidthFitPath(path)))); - } - } - - if (hasParameter("document-version")) { - var version = getParameter("document-version"); - if (version) { - c += makeRow(makeColumn(d(localize("Document Version") + ": ") + v(version))); - } - } - } + // if (getProperty("showDocumentPath")) { + // if (hasParameter("document-path")) { + // var path = getParameter("document-path"); + // if (path) { + // c += makeRow(makeColumn(d(localize("Document Path") + ": ") + v(pageWidthFitPath(path)))); + // } + // } + + // if (hasParameter("document-version")) { + // var version = getParameter("document-version"); + // if (version) { + // c += makeRow(makeColumn(d(localize("Document Version") + ": ") + v(version))); + // } + // } + // } if (getProperty("showNotes") && hasParameter("job-notes")) { var notes = getParameter("job-notes"); @@ -1358,7 +1371,7 @@ function onSectionEnd() { } c += makeRow(makeColumn( - d(localize("Stock")) + ":
  " + v(localize("DX") + ": " + spatialFormat.format(delta.x) + getUnitSymbolAsString()) + "
  " + v(localize("DY") + ": " + spatialFormat.format(delta.y) + getUnitSymbolAsString()) + "
  " + v(localize("DZ") + ": " + spatialFormat.format(delta.z) + getUnitSymbolAsString()) + d(localize("Stock")) + ":
  " + v(localize("X Size") + ": " + spatialFormat.format(delta.x) + getUnitSymbolAsString()) + "
  " + v(localize("Y Size") + ": " + spatialFormat.format(delta.y) + getUnitSymbolAsString()) + "
  " + v(localize("Z Size") + ": " + spatialFormat.format(delta.z) + getUnitSymbolAsString()) )); // if (hasParameter("part-lower-x") && hasParameter("part-lower-y") && hasParameter("part-lower-z") &&