Importation of Data

Use this forum to ask questions about how to do things in QCAD.

Moderator: andrew

Forum rules

Always indicate your operating system and QCAD version.

Attach drawing files and screenshots.

Post one question per topic.

Post Reply
lambspring
Registered Member
Posts: 2
Joined: Fri Feb 28, 2014 11:23 pm

Importation of Data

Post by lambspring » Wed Mar 05, 2014 12:04 am

I want to use Qcad for plotting survey data in establishing a multilayer map of an arboretum. I have survey coordinates of several hundred survey monuments and will have coordinates of many many hundreds of plants. Is there any means where by I can import this data from MS Excel into Qcad. The intend would be to simply create at each coordinate spot as a dot or circle of some size but there would be no lines connecting any of them. Perhaps another way to ask the question is whether one can write a macro (likely beyond my present ability) which would do the job. Ideally the coordinates and an identifying number would be imported and plotted with the text identifying number.

Bob

User avatar
andrew
Site Admin
Posts: 9052
Joined: Fri Mar 30, 2007 6:07 am

Re: Importation of Data

Post by andrew » Thu Mar 06, 2014 8:42 am

Yes, this is certainly possible.

I see the most tricky part in the fact that the files are in Excel format which is not easily readable by other applications.

The two best solutions for that I can think of are:
- Batch convert the Excel files to CSV (a text format which is much easier to read and understand). There are free tools available to achieve this automatically, for example xsl2csv
- Use a C++ library (wrapped in a QCAD C++ plugin) to parse the Excel files directly. For example this ExcelFormat Library.

In the first scenario, the QCAD part is likely trivial since CSV files are straight forward to read and interpret.
The condition is of course that the files are formatted in a consistent way (for example the first column is an ID, the second column is the X coordinate, the third column is the Y coordinate).
An example script that parses point coordinates from a text file is available in scripts/Misc/Examples/IOExamples/ExImportPoints.

lambspring
Registered Member
Posts: 2
Joined: Fri Feb 28, 2014 11:23 pm

Re: Importation of Data

Post by lambspring » Sun Mar 09, 2014 4:26 am

Andrew, Thank you for the comments. I will look into your suggestions and see how they operate; it will become a bit of a study. Bob

Post Reply

Return to “QCAD 'How Do I' Questions”