I just started scripting, and i wonder if the API doc (http://www.ribbonsoft.com/qcadlib_qcads ... ssref.html) is up-to-date?
E.g.
Code: Select all
var doc = new Document();
doc.firstEntity().getEntity();
Thanks for reading!
chri
Moderator: andrew
Code: Select all
var doc = new Document();
doc.firstEntity().getEntity();
Yes.chri wrote: I just started scripting, and i wonder if the API doc (http://www.ribbonsoft.com/qcadlib_qcads ... ssref.html) is up-to-date?
The correct syntax is:chri wrote: E.g.Code: Select all
var doc = new Document(); doc.firstEntity().getEntity();
Code: Select all
var doc = new Document;
var entity = doc.firstEntity();
The API doc is generated from the C++ code and therefore also lists internal C++ functions that are not available to scripts (like getEntity which in C++ returns the internal entity object that is wrapped by the entity wrapper class).chri wrote: According to the API, there should be a getEntity function (http://www.ribbonsoft.com/qcadscripting ... apper.html), but there isn't.
Please have a look at the script examples that come with QCAD. They demonstrate almost everything that can currently be done with the scripting interface of QCAD (mainly adding entities). For generic QSA classes, please refer to: http://doc.trolltech.com/qsa-1.2.0/language.html and http://doc.trolltech.com/qsa-1.2.0/exte ... ework.htmlchri wrote: How can I generate an up-to-date version of the API for the current professional edition, preferable with inheritances to qsa base classes?