Thanks for the guidance,
works like a charm.
Pere,
Search found 14 matches
- Mon Oct 15, 2018 11:41 am
- Forum: QCAD Programming, Script Programming and Contributing
- Topic: Create .txt file
- Replies: 2
- Views: 6439
- Mon Oct 15, 2018 11:19 am
- Forum: QCAD Programming, Script Programming and Contributing
- Topic: Create .txt file
- Replies: 2
- Views: 6439
Create .txt file
Hello and thank you for your time, I am trying to create a txt file with some results calculated inside a script. I was following this discussion: https://www.qcad.org/rsforum/viewtopic.php?f=7&t=614&p=1788&hilit=write+txt#p1788 include("scripts/File/File.js") var file = new File("file.txt"); file.o...
- Mon Oct 01, 2018 2:20 pm
- Forum: QCAD Programming, Script Programming and Contributing
- Topic: Playing with Custom Properties
- Replies: 1
- Views: 6036
Re: Playing with Custom Properties
Hello again, I kept browsing around and found my main mistake (although I don't know if it's the expected behaviour). When setting the new CustomProperty, it does not work unless you set title to "QCAD": op = new RAddObjectsOperation(false); var hatch = new RHatchEntity(document, hatchData); hatch.s...
- Mon Oct 01, 2018 8:02 am
- Forum: QCAD Programming, Script Programming and Contributing
- Topic: Playing with Custom Properties
- Replies: 1
- Views: 6036
Playing with Custom Properties
Hello and thank you for your time, I've notices that motors like GDAL do not allow DXF files to contain any kind of information that is not geometric (for example, when using ogr2ogr to retrieve DB data as DXF, non geometric fields in the query are ignored). However, in QCAD I've seen the possibilit...
- Fri Sep 28, 2018 11:38 am
- Forum: QCAD Programming, Script Programming and Contributing
- Topic: RAddObjectsOperation
- Replies: 2
- Views: 5951
Re: RAddObjectsOperation
Works like a charm,
Thanks
Thanks
- Fri Sep 28, 2018 11:12 am
- Forum: QCAD Programming, Script Programming and Contributing
- Topic: RAddObjectsOperation
- Replies: 2
- Views: 5951
RAddObjectsOperation
Hello and thank you for your time, When using RAddObjectOperation, is it possible to also change the REntity properties? What I am trying to achieve is: var hatch = new RHatchEntity(document, hatchData); hatch.setColor(new RColor(0, 0, 255, 1)); hatch.setLayerId(MyLayerId); var op = new RAddObjectOp...
- Fri Sep 07, 2018 8:30 am
- Forum: QCAD Programming, Script Programming and Contributing
- Topic: Creating RHatchEntity
- Replies: 3
- Views: 7751
Re: Creating RHatchEntity
Thank you for your reply.
What we are trying to do, however, is creating a filled hatch from any kind of closed polygon. Is that possible? Or Hatch are limited to regular polygons?
Thanks,
Pere
What we are trying to do, however, is creating a filled hatch from any kind of closed polygon. Is that possible? Or Hatch are limited to regular polygons?
Thanks,
Pere
- Thu Sep 06, 2018 3:58 pm
- Forum: QCAD Programming, Script Programming and Contributing
- Topic: Creating RHatchEntity
- Replies: 3
- Views: 7751
Creating RHatchEntity
Hello and thank you for your time, I was looking around for a way of creating different objects into a drawing. As an example, I created a RPolyline with the following steps: QList -> RPolyline -> RPolylineData -> RPolylineEntity and adding the object to the document. var pList = [new RVector(500, -...
- Mon Sep 03, 2018 2:52 pm
- Forum: QCAD Programming, Script Programming and Contributing
- Topic: PDF export after applying Operations
- Replies: 6
- Views: 9449
Re: PDF export after applying Operations
Good afternoon, Please find attached the resulting DXF file exported at the end of the process and the looks of the resulting PDF. Note that the PDF export is done just above. What we are using on the process is a template with title/subtitle to directly frame what we want to print in the DXF. As th...
- Mon Sep 03, 2018 7:22 am
- Forum: QCAD Programming, Script Programming and Contributing
- Topic: PDF export after applying Operations
- Replies: 6
- Views: 9449
Re: PDF export after applying Operations
Hello Andrew, Thank you for your response. However, it didn't solve the issue. Following the RDocumentInterface docs I also tried (without results) the following methods: 1- di.regenerateViews(true); 2- di.repaintViews(); 3- di.registerScene(scene) + view.setScene(scene) I would appreciate further g...
- Fri Aug 31, 2018 12:52 pm
- Forum: QCAD Programming, Script Programming and Contributing
- Topic: PDF export after applying Operations
- Replies: 6
- Views: 9449
Re: PDF export after applying Operations
Appreciate your fast response. The new code logic involves the following steps: * Initialization of document and document interface * Generation of view and scene * Applying Operations (There are also RPasteOperation, as we are merging different files, I am not sure if those affect differently than ...
- Fri Aug 31, 2018 12:41 pm
- Forum: QCAD Programming, Script Programming and Contributing
- Topic: PDF export after applying Operations
- Replies: 6
- Views: 9449
PDF export after applying Operations
Hello and thank you for your time, We're using the scripting tool for importing different DXF files and applying some changes to both layers and entities. The is idea getting some printings while we keep applying modifications. My question arises as when exporting, the changes do not appear in the r...
- Fri Aug 24, 2018 7:40 am
- Forum: QCAD 'How Do I' Questions
- Topic: LineWeight Scripting
- Replies: 2
- Views: 2959
Re: LineWeight Scripting
Must have messed up somewhere, code works perfect now. However, please let me ask one last thing.
In the code above I am manually changing the LW for one specific layer. Is there a way to change the global default value of every layer without needing to iterate over all of them?
Thanks again,
Pere
In the code above I am manually changing the LW for one specific layer. Is there a way to change the global default value of every layer without needing to iterate over all of them?
Thanks again,
Pere
- Thu Aug 23, 2018 4:14 pm
- Forum: QCAD 'How Do I' Questions
- Topic: LineWeight Scripting
- Replies: 2
- Views: 2959
LineWeight Scripting
Hello and thank you for your time. First of all, just let me say that the product you made is amazing and has been really helpful in the project I am working on. I am wrecking my head around scripting some processes. In one of those, I need to export from DXF to PDF by tunning some PaperSpace parame...