Accessing QCAD Application Framework API with ECMAscript

Use this forum for all posts and questions about the free QCAD Community Edition version 3

Moderator: andrew

Post Reply
333onlyhalfevil
Junior Member
Posts: 21
Joined: Fri Apr 28, 2023 12:39 pm

Accessing QCAD Application Framework API with ECMAscript

Post by 333onlyhalfevil » Wed May 24, 2023 10:42 pm

Hello everyone:

Is it possible to access the QCAD application framework portion of QCAD's API with an ECMA script? If I try to use a QCAD Application Framework constructor within an ECMA script, the debugger will say the object couldn't be created. Is there a special way to include cpp files?

Thanks in advance.

333onlyhalfevil
Junior Member
Posts: 21
Joined: Fri Apr 28, 2023 12:39 pm

Re: Accessing QCAD Application Framework API with ECMAscript

Post by 333onlyhalfevil » Tue Jul 11, 2023 3:59 pm

Hello, thought I'd post something here for anyone who might find themselves here in the future.

The answer to the OP is that you should just be able to work with the QCAD application framework directly using the ECMA script. I don't remember exactly what I was doing when I was getting the error since I posted that a couple months ago but, now that I've pounded my head into it a bit since then, it seems to work fine. I think I was just doing it wrong. Note that you don't have to include anything at the top of your script in order to be able to use anything out of the QCAD application framework API. I just thought that maybe it wasn't working because I needed to but you only need to include scripts within your custom ECMAscript script that you're trying to use inheritance with. Also note that you need to use ECMAscript formatting and not the c++ formatting shown in the developer documentation (assuming you're scripting with ECMAscript and not trying to write a c++ plugin).

Anyways, I think that's it. I hope that helps someone out someday. :?

Post Reply

Return to “QCAD Community Edition”