Hi @AchimN ,
thanks for your answer, that's just the way we intented! Unfortunately the code doesn't work for me.
That's my properties:
properties = {
embedStylesheet: {
title : "Embed stylesheet",
description: "Embeds the stylesheet in the HTML code.",
type : "boolean",
value : true,
scope : "post"
},
useUnitSymbol: {
title : "Use unit symbol",
description: "Specifies that symbols should be used for units (some printers may not support this).",
type : "boolean",
value : false,
scope : "post"
},
showDocumentPath: {
title : "Show document path",
description: "Specifies that the document path should be output.",
type : "boolean",
value : true,
scope : "post"
},
showModelImage: {
title : "Show model image",
description: "If enabled, a model image will be included in the setup sheet.",
type : "boolean",
value : true,
scope : "post"
},
showToolImage: {
title : "Show tool images",
description: "If enabled, tool images will be included in the setup sheet.",
type : "boolean",
value : true,
scope : "post"
},
showPreviewImage: {
title : "Show preview image",
description: "If enabled, a preview image will be included in the setup sheet.",
type : "boolean",
value : true,
scope : "post"
},
previewWidth: {
title : "Preview width",
description: "Specifies the width of the preview image.",
type : "string",
value : "8cm",
scope : "post"
},
showPercentages: {
title : "Show percentages",
description: "Specifies that the percentage of the total cycle time should be shown for each operation cycle time.",
type : "boolean",
value : true,
scope : "post"
},
showFooter: {
title : "Show footer",
description: "Specifies whether a footer should be included in the HTML setup sheet.",
type : "boolean",
value : true,
scope : "post"
},
showRapidDistance: {
title : "Show rapid distance",
description: "Specifies whether the rapid distance should be output.",
type : "boolean",
value : true,
scope : "post"
},
rapidFeed: {
title : "Rapid feed",
description: "Sets the rapid traversal feedrate. Set this to get more accurate cycle times.",
type : "number",
value : 5000,
scope : "post"
},
toolChangeTime: {
title : "Tool change time",
description: "Sets the tool change time in seconds. Set this to get more accurate cycle times.",
type : "number",
value : 15,
scope : "post"
},
showNotes: {
title : "Show notes",
description: "Writes operation notes as comments in the outputted code.",
type : "boolean",
value : true,
scope : "post"
},
forcePreview: {
title : "Force preview",
description: "Enable to force a preview picture for all instances of a pattern.",
type : "boolean",
value : false,
scope : "post"
},
showOperations: {
title : "Show operations",
description: "Enable to output information for each operation.",
type : "boolean",
value : true,
scope : "post"
},
showTools: {
title : "Show tools",
description: "Enable to see information for each tool.",
type : "boolean",
value : true,
scope : "post"
},
showTotals: {
title : "Show totals",
description: "Enable to see total information.",
type : "boolean",
value : true,
scope : "post"
},
embedImages: {
title : "Embed images",
description: "If enabled, images are embedded into the HTML file.",
type : "boolean",
value : true,
scope : "post"
},
customImage: {
title : "Custom image",
description: "Select a custom image file to be displayed in the setup sheet",
type : "file",
value : "",
scope : "post"
}
};
That's the other part of the code:
if (modelImagePath && getProperty("showModelImage")) {
if (getProperty("customImage") == "") {
var path = FileSystem.getCombinedPath(FileSystem.getFolderPath(getOutputPath()), modelImagePath);
} else {
var path = getProperty("customImage");
}
var src="";
if (!FileSystem.isFile(path)) {
warning(subst(localize("Model image doesn't exist '%1'."), path));
} else {
if (getProperty("embedImages") && (revision >= 41366)) {
// add support for image from database instead
src=getImageAsImgSrc(path);
if (getProperty("customImage") == "") {
FileSystem.remove(path);
}
} else {
src=encodeURIComponent(modelImagePath);
}
}
++numberOfColumns;
var alignment = (numberOfColumns <= 1) ? "center" : "right";
write("<td class=\"model\" align=\"" + alignment + "\"><img src=\"" + src + "\"/></td>");
}
Have I done something wrong?