Thanks for your interest in QCAD.
I have no experience with Windows specific products or technologies such as Excel or VBA but I can answer the QCAD side of the question.
To launch QCAD from another process and hand over some data, one would typically use a file (DXF, CSV, XML or any other convenient file format to transfer the data in question) or an SQL database.
To dynamically interact with QCAD from another process while QCAD is already running there are several IPC (inter process communication) mechanisms that can be employed:Use command line arguments to trigger an event
Generally, only one QCAD process can be running at a time. Launching QCAD again if it is already running will not start QCAD again but instead pass the command line arguments to the running instance of QCAD. This can be used for a simple way of IPC. For example if QCAD is already running and you launch it again, with these arguments:
- Code: Select all
qcad.exe -exec scripts/File/NewFile/NewFile.js
This will create a new drawing in the already running instance of QCAD. Instead of running this existing script to create a new drawing, any other (custom) script can be run whenever needed to do virtually anything (import a file, add an entity, perform an auto zoom, etc).Network (TCP/IP)
Since QCAD scripts have access to the Qt API, a network server / client protocol could be used to communicate with QCAD.Polling
A QCAD script could be used to regularly check if a file on disk has changed, a new file has been created in a specific directory for processing or importing, etc.Plugins
A QCAD C++ plugin could be used to make any (platform specific) technology available to interact with QCAD.