[SOLVED] framework version

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
CVH
Premier Member
Posts: 3467
Joined: Wed Sep 27, 2017 4:17 pm

[SOLVED] framework version

Post by CVH » Fri Oct 23, 2020 8:29 am

Andrew,

To extract an orphanated hatch pattern Tile2Hatch has to check the QCAD framework being 3.25.2.1 or later.

What is best practice?
RSettings.getNumericalVersionString()
- Application version as 01020304 for 1.2.3.4
RSettings.getIntValue("Application/Version", 0)
- Stored Application version from QCAD.ini as 01020304 for 1.2.3.4

I asume the leading zero is a typo for a Number type. :wink:

The other option is library.js
Why does requiresFramework uses 3 digits per section?
What to pass here as maxVersion array if a maximum is not defined?

Regards,
CVH
Last edited by CVH on Mon Oct 26, 2020 6:01 pm, edited 2 times in total.

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

Re: framework version

Post by andrew » Mon Oct 26, 2020 3:13 pm

I'd use:

Code: Select all

if (RSettings.getCurrentVersion()>=3250201) {
    ...
}

CVH
Premier Member
Posts: 3467
Joined: Wed Sep 27, 2017 4:17 pm

Re: framework version

Post by CVH » Mon Oct 26, 2020 6:00 pm

Thanks for the advise ...
All where prepared, used the isSmaler variant to rule thing out.
An lazy edit later .... 8)

Regards,
CVH

Post Reply

Return to “QCAD Programming, Script Programming and Contributing”