script to Enable/Disable Layers

Post here to ask questions about or get help with the scripting module of QCAD 2.1/2.2.

Moderator: andrew

script to Enable/Disable Layers

Postby lorenzen » Thu Mar 27, 2008 6:39 pm


I have a made a houseplan with a multitude of layers, which will
be the source for a number of drawings, with different layers shown.

I cannot find any reference to the Show/Hide layer script functions.
I would like to implement something like this:
Code: Select all
function main() {
    var doc = new Document;
    var view = new View;

    var layers = [ "roof", "foundation", "wall1", "wall2" ];

    for (var i = 0; i < layers.length; i++) {
// doc.ShowAllLayers and doc.HideLayer would be nice to have too.


Best Regards


I am using
Code: Select all
A Dane in England
Newbie Member
Posts: 9
Joined: Wed Mar 26, 2008 12:41 pm

Postby andrew » Thu Mar 27, 2008 6:50 pm

This is indeed not possible at this point. You can only set the active layer and add new layers.
User avatar
Site Admin
Posts: 3503
Joined: Fri Mar 30, 2007 6:07 am

Return to QCAD 2.1/2.2 Developers

Who is online

Users browsing this forum: No registered users and 0 guests