QCAD command line scripting - Request for Info
Moderators: andrew, Husky, J-J
QCAD command line scripting - Request for Info
i have 2 input files a DXF and a js that i want to combine and pubilish as a dxf by a command line solution.
first input file : file1.dxf (and the title section contains a number from 1 upto 1001)
second input file : file1.js that addLine(94.0,420.0,94.0,421.0) entries
can combine the two files by: qcad.exe file1.dxf -exec file1.js
after processing the wanted result is shown on the screen.
how can i automatically save the result in an automated way on a command line based solution.
As alternative solution i have tried the "QCAD merg " command:
merge -t R27 o -file3.dxf input.xml (file1 and File2 are attached)
try to view it by:
qcad.exe file3.dxf
no result on the screen - nor in model-space / nor in paper-space
the file3.dxf contains some input - no display at all and i can not judge the correctness of the merge.
Could you provide me some guidance on how to continue and publish my results in an automated way ?
Re: QCAD command line scripting - Request for Info
Please have a look at the sources of the merge tool for a complete example of how to create a command line tool that reads and writes files:
https://github.com/qcad/qcad/blob/maste ... rawings.js
https://github.com/qcad/qcad/blob/maste ... rawings.js
Re: QCAD command line scripting - Request for Info
Andrew,
i have elaborated the code
have s1.dxf and s2.dxf,
merge -o s3.dxf s.xml
compare the output in notepad and find a lot of differences.
do not have a reference to start from and i would like to learn how to merge correctly
S1.dxf is shown correctly in QCAD, S2.dxf is shown correctly in QCAD
s3.dxf has dxf format but i seem not be able to present it on the screen - always an empty view
could you point to the issue such that i can learn and improve ?
Kind Regards
Hugo
i have elaborated the code
have s1.dxf and s2.dxf,
merge -o s3.dxf s.xml
compare the output in notepad and find a lot of differences.
do not have a reference to start from and i would like to learn how to merge correctly
S1.dxf is shown correctly in QCAD, S2.dxf is shown correctly in QCAD
s3.dxf has dxf format but i seem not be able to present it on the screen - always an empty view
could you point to the issue such that i can learn and improve ?
Kind Regards
Hugo
Re: QCAD command line scripting - Request for Info
- The XML file is not valid (remove first line with the text "XML format:"). You can validate XML files online for example at http://www.xmlvalidation.com/
- The paths to your source files are not correct ("/s1.dxf"). Try "s1.dxf" if the files are in the same directory as the XML file or the absolute, complete path.
- The paths to your source files are not correct ("/s1.dxf"). Try "s1.dxf" if the files are in the same directory as the XML file or the absolute, complete path.