Problems with startup layers.

If you have a question about the software please ask it here.

Re: Problems with startup layers.

Postby cncdrive » Tue Sep 04, 2018 8:39 am

I don't really understand what you want to do, but I can explain how it works and so you can then probably figure it out.
So, there are layers. The parent of all layers is layer 1. or in other words it is the base layer.
Then there are (can be) child layers. All layers have a layer number and a parent layer number.
When a layer is selected then it is visible and so it's child layers which are selected are also visible.
Ofcourse a child layer can't be visible if it's parent is invisible.
The items (elements) on a layer are visible when the layer is selected (visible).
It all works the same as tab controls in Windows Forms.
cncdrive
Site Admin
 
Posts: 4695
Joined: Tue Aug 12, 2014 11:17 pm

Re: Problems with startup layers.

Postby Robertspark » Tue Sep 04, 2018 9:38 am

example attached
Attachments
2018-09-04 10_37_18-SKM_C30818090410090 - PDF-XChange Editor.png
Robertspark
 
Posts: 1892
Joined: Sat Sep 03, 2016 4:27 pm

Re: Problems with startup layers.

Postby Robertspark » Tue Sep 04, 2018 9:39 am

So if you click on layer 21 for example you can see all layers above 21 too (i.e. layer 1 and layer 2 and layer 21), but not 22 and 23 3tc.
Robertspark
 
Posts: 1892
Joined: Sat Sep 03, 2016 4:27 pm

Re: Problems with startup layers.

Postby cncdrive » Tue Sep 04, 2018 9:44 am

Thanks Rob for the nice explanation drawing, it tells more than my text description.
cncdrive
Site Admin
 
Posts: 4695
Joined: Tue Aug 12, 2014 11:17 pm

Re: Problems with startup layers.

Postby dezsoe » Tue Sep 04, 2018 10:32 am

Robertspark wrote:So if you click on layer 21 for example you can see all layers above 21 too (i.e. layer 1 and layer 2 and layer 21), but not 22 and 23 3tc.

Yes, it's true, but if you call AS3.selectlayer, then it will not select the parent layers. His problem is that in the screen file there are selectlayer calls and when you select a sublayer without selecting the parent(s), the screen will be a garbage. Run this macro and you'll see the result:

Code: Select all
AS3.selectlayer(46);

selectlayer.png
dezsoe
 
Posts: 2049
Joined: Sun Mar 12, 2017 4:41 pm
Location: Csörög, Hungary

Re: Problems with startup layers.

Postby kig23 » Tue Sep 04, 2018 10:45 am

Thanks Rob for your drawing, but i know the structure of the layers well enough. Maybe i didn't explain myself clear enough. The file was only to show you the issue. The layer structure of my screenset is more complex. Here is an example. Let say we have this layer structure:

Tab 1 on Layer 2, with Parent Layer = 1.
Tab 2 on layer 21 is a child of Layer 2.
Tab 3 on layer 22 is a child of Layer 2.
Tab 4 on layer 3, with Parent Layer = 1

If in screen edit mode you select Tab 4 (layer 3) and save the screenset file, when restart uccnc on tab 4 you'll see tab 2 and 3. I need that the two child layers 21 and 22 are visible only on layer 2, for this reason they are childs of layer 2. Thanks
kig23
 
Posts: 158
Joined: Sat Mar 31, 2018 6:58 am
Location: Italy

Re: Problems with startup layers.

Postby ger21 » Tue Sep 04, 2018 11:01 am

As I explained before, if you want to start on Tab 4, then you should put it on layer 2, then you won't have any problems.

Tab4 on Layer 2
Tab1 on Layer 3
Tab2 on Layer 31, Child of 3
Tab3 on Layer 32, Child of 3
Gerry
UCCNC 2022 Screenset - http://www.thecncwoodworker.com/2022.html
ger21
 
Posts: 2663
Joined: Sat Sep 03, 2016 2:17 am

Re: Problems with startup layers.

Postby kig23 » Tue Sep 04, 2018 11:42 am

Hi Gerry. I'm gonna explain me again. Let say we have screen layer structure.

Tab 1 on Layer 2, with Parent Layer = 1.
Tab 2 on layer 21 is a child of Layer 2.
Tab 3 on layer 22 is a child of Layer 2.
Tab 4 on layer 3, with Parent Layer = 1

when you save screenset file with Layer 2 selected you have:
Code: Select all
//Select the startup layers for the main screen
AS3.selectlayer(21);
AS3.selectlayer(2);

but when you save the screen file with Layer 3 selected you have this one:
Code: Select all
//Select the startup layers for the main screen
AS3.selectlayer(3);
AS3.selectlayer(21);

Like you can see for some reason uccnc puts the layer 21 (child of layer 2) over layer 3. This issue is when you have child layers on layer2. I thought that uccnc puts the last selected layer over the others and on restart uccnc you'll see this layer only.
kig23
 
Posts: 158
Joined: Sat Mar 31, 2018 6:58 am
Location: Italy

Re: Problems with startup layers.

Postby Robertspark » Tue Sep 04, 2018 12:11 pm

If you have two layers with the same number, that screws everything up and you get ghosting.... Plus from memory the screen editor may change some of the layers in the ssf file, making it not just a case of giving the layer another number, but checking the others using a text editor within the ssf file directly
Robertspark
 
Posts: 1892
Joined: Sat Sep 03, 2016 4:27 pm

Re: Problems with startup layers.

Postby ger21 » Tue Sep 04, 2018 12:14 pm

I realize that it doesn't work as expected, but the workaround, as I described, is very simple, and will work every time.
Gerry
UCCNC 2022 Screenset - http://www.thecncwoodworker.com/2022.html
ger21
 
Posts: 2663
Joined: Sat Sep 03, 2016 2:17 am

PreviousNext

Return to Ask a question from support here

Who is online

Users browsing this forum: No registered users and 26 guests

cron