The javascript works if I run the script after starting qcad ("Misc/Development/Run Script"). I have some questions about this.
1. Where is the documentaion or declaration is for qWarning?
2. I've read that you should include simple.js. Is that no longer required?
3. Layer '0' still shows up. Can I rename '0' to 'main' or delete layer '0'?
Code: Select all
qWarning('hello');
var document = this.getDocument();
var di = this.getDocumentInterface();
addLayer('main');
addLayer('dimensions');
di.setCurrentLayer('main');
di.setCurrentColor(new RColor(255, 0, 0));
points = [
[0, 0],
[40, 0],
[40, 40],
[0, 40],
]
closed = true
relative = false
addPolyline(points, closed, relative)
autoZoom();
Bob