Using a Digitizing Tablet

Hello,
i would like using a Digitizing Tablet to enter points or lines with absolute coordinates to a qcad drawing. I already have generated a C-program getting the coordinates of the digitizing mouse when a button of the mouse is pressed. What is the best way to enter these coordinates to a drawing. Could i do that with a plugin to QCAD, calling a routine in the QCAD-Api for entering a point or line to the drawing, or should i create a script for every event and executing this for every point or line? Or could i use a separate program started by a ECMA-script returning the coordinates with a special protocol?

I think, this plays no matter, but my OS is Windows10 and QCAD Version is 3.26.4.0 Arch x86_64.

Thanks in advance - meimaddin

Normally when a Digitizing Tablet works on your OS then it would interact with QCAD just the same as a mouse.
All depends … With customizable button areas you probably need to configure it to send QCAD shortcut keys.

There is some success reported with what is called “SendKeys”, look it up in the forum. :wink:

Two hits from the forum:

Regards,
CVH

There are various ways to interact with QCAD.

The easiest way would be copy / paste, i.e. output a text file of coordinates with your application and copying that to the clipboard or copying coordinates to the clipboard directly from your application.
You can then simply paste this list of coordinates into the QCAD command line while the appropriate tool is running (points, lines, polylines, etc.)

Another way is to import a coordinate text file into QCAD using a script similar to this script that imports points from a list of coordinates:

If you need direct visualization while tracing, you’d have to create a more direct communication channel to QCAD. You could for example start your application from a QCAD script using QProcess and listen to the stdout output of your application to retrieve coordinates. Example for QProcess:

This would have to be modified to not wait for the process to finish and read stdout line by line.

Thank you CVH and andrew. I will try using ExProcess.js since this seems to give the result i imagine. I will keep you informed whether i succeed!

Best regards - mymaddin