Is it possible to know the coordinates of the bounds of a dwg and the center of it ? We have a big city cad map splitted on a lot of mini-maps and we want to know via a script the center and the bounds in coordinates of this maps
And a second question : Is it possible to get access to the source code in a pro version of MergeDrawings.js in order to know how to join these files in one file in my own script.
Thanks in advance
Santiago Pérez
QCAD API get coordinates and MergeDrawings.js
Moderator: andrew
Forum rules
Always indicate your operating system and QCAD version.
Attach drawing files and screenshots.
Post one question per topic.
Always indicate your operating system and QCAD version.
Attach drawing files and screenshots.
Post one question per topic.
Re: QCAD API get coordinates and MergeDrawings.js
Yes, that's possible.
Sources for MergeDrawings:
https://github.com/qcad/qcad/tree/maste ... geDrawings
Code: Select all
// the bounding box of a drawing document (doc):
var bbox = doc.getBoundingBox();
// center of bounding box:
var center = bbox.getCenter();
https://github.com/qcad/qcad/tree/maste ... geDrawings
Re: QCAD API get coordinates and MergeDrawings.js
Thanks a lot . It works perfectly.