I can't change the color of an entity

Discussion forum for C++ and script developers who are using the QCAD development platform or who are looking to contribute to QCAD (translations, documentation, etc).

Moderator: andrew

Forum rules

Always indicate your operating system and QCAD version.

Attach drawing files, scripts and screenshots.

Post one question per topic.

Post Reply
pietro_72_
Full Member
Posts: 81
Joined: Fri Apr 17, 2015 6:40 am
Location: http://creativitainformaticart.altervista.org

I can't change the color of an entity

Post by pietro_72_ » Thu Dec 26, 2019 5:32 pm

Hello
I can't change the color of an entity made with QCAD Simple API
I did some tests (see around line 662 of the attached code) also taking inspiration from https://qcad.org/rsforum/viewtopic.php? ... olor#p8279
Attachments
OrthogonalProjections.js
(78.01 KiB) Downloaded 434 times

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

Re: I can't change the color of an entity

Post by andrew » Thu Dec 26, 2019 6:21 pm

Try:

Code: Select all

op.addObject(entity, false);
false: Don't use current attributes chosen by user.

pietro_72_
Full Member
Posts: 81
Joined: Fri Apr 17, 2015 6:40 am
Location: http://creativitainformaticart.altervista.org

Re: I can't change the color of an entity

Post by pietro_72_ » Thu Dec 26, 2019 6:35 pm

ok, thanks, it works

Post Reply

Return to “QCAD Programming, Script Programming and Contributing”