It would be good if we had the line types in the attached drawing which are a variation of "drainage". They could be used to show offset cutting in the CAM preview document.
I've made a small change to createLayer to set line types. Changes are marked with // .
Code: Select all
Codesrl.prototype.createLayer = function(layerName, color, lineType) {//
if (lineType == null)//
lineType = "continuous";//
var layerId = this.newDocument.getLayerId(layerName);
if (layerId!==RObject.INVALID_ID) {
return layerId;
}
var layer = new RLayer(
this.newDocument,
layerName,
false, false,
color,
this.newDocument.getLinetypeId(lineType),//
RLineweight.Weight000
);
var op = new RAddObjectOperation(layer);
this.newDocumentInterface.applyOperation(op);
return this.newDocument.getLayerId(layerName);
};
srl