calculation syntax
Moderator: andrew
Forum rules
Always indicate your operating system and QCAD version.
Attach drawing files and screenshots.
Post one question per topic.
Always indicate your operating system and QCAD version.
Attach drawing files and screenshots.
Post one question per topic.
- DaleEltoft
- Active Member
- Posts: 37
- Joined: Tue Jun 29, 2021 1:23 am
- Location: Creedmoor, NC USA
calculation syntax
I've been using the ability to enter numbers as simple arithmetic with +-*/. Now I need to do powers and roots. If this is possible, where can I find documentation of the syntax?
- petevick
- Premier Member
- Posts: 392
- Joined: Tue May 19, 2020 9:34 am
- Location: North Norfolk coast UK
Re: calculation syntax
there are a few snippets here that may help you - https://qcad.org/rsforum/viewtopic.php?t=3543
Pete Vickerstaff
Linux Mint 21.2 Cinnamon, Qcad Pro 3.29.6
Linux Mint 21.2 Cinnamon, Qcad Pro 3.29.6
Re: calculation syntax
The syntax is basic JavaScript, so for example Math.pow(3,2) and Math.sqrt(9) will work. However, in QCAD, for convenience, pow(3,2) and sqrt(9) also work.
See also:
https://qcad.org/doc/qcad/latest/refere ... ommandLine
See also:
https://qcad.org/doc/qcad/latest/refere ... ommandLine
- DaleEltoft
- Active Member
- Posts: 37
- Joined: Tue Jun 29, 2021 1:23 am
- Location: Creedmoor, NC USA
Re: calculation syntax
Thanks