I have tried tomek's solution and the result is a mess with the labels being unreadable blobs all
positioned on top of each other. In any event, this project is becoming tedious and I will find something else to do.
Importing Ascii files
Moderator: andrew
Re: Importing Ascii files
Works for me with a little tweaking.
CVH
Regards,CVH
Re: Importing Ascii files
One needs to individually move each layer and change its text size. If you are happy with that, let's leave it there but how would any surveyor know about tomek's method? Without that knowledge, QCAD would appear inadequate to his needs.
Incidentally, is it possible to retain the old Import Points function after including tomek's script?
Incidentally, is it possible to retain the old Import Points function after including tomek's script?
Re: Importing Ascii files
I've got both the old and new scripts in the menu and running separately now. Surveyors also use a third system: N, X, Y, C for cadastral points and setting-out.
Re: Importing Ascii files
The case is that an XY, NXYZC or NXYC list has no info on font and fontsize, layer names, colors, and so on.
The spacing in the text placement was simply solved with 3 additions and 2 subtractions.
Code: Select all
setCurrentLayer ("number");
addSimpleText(coordinates[0], new RVector(parseFloat(coordinates[1]-0.1), parseFloat(coordinates[2])), 0.15, 0, "Standard", RS.VAlignMiddle, RS.HAlignRight, false, false);
setCurrentLayer ("height");
addSimpleText(coordinates[3], new RVector(parseFloat(coordinates[1]+0.1), parseFloat(coordinates[2])+0.05), 0.10, 0, "Standard", RS.VAlignBase, RS.HAlignLeft, false, false);
setCurrentLayer ("code");
addSimpleText(coordinates[4], new RVector(parseFloat(coordinates[1]+0.1), parseFloat(coordinates[2])-0.05), 0.10, 0, "Standard", RS.VAlignTop, RS.HAlignLeft, false, false);
setCurrentLayer ("point"); operation.addObject(point);
CVH
Re: Importing Ascii files
QCAD 3.26.4 comes with a new tool to import point data with labels from CSV:
https://qcad.org/en/tutorial-importing- ... s-from-csv
https://qcad.org/en/tutorial-importing- ... s-from-csv