It looks like you're new here. If you want to get involved, click one of these buttons!
Hi,
I want to create a new layer and set its GDS layer/datatype, name, set its color, filling color, shape, width :
### create a layer view for the wafer
linfo1 = RBA::LayerInfo.new(1,0)
linfo1.name = "wafer"
layer_id = layout.insert_layer( linfo1 )
ln1 = RBA::LayerPropertiesNode::new
ln1.source_layer_index = layer_id
ln1.dither_pattern = 1
ln.fill_color = 0xFF0000
ln1.frame_color = 0xFF0000
ln1.name = "wafer"
ln1.width = 3
layout_view.insert_layer( layout_view.end_layers, ln1 )
Unfortunatly, it creates 2 layers : where is my mistake ?
Thank you,
Laurent
Comments
Hi Laurent,
This is not the full code. Without the missing part, I am not able to really answer this question. I guess there is a "add_missing_layers" or something like this later on.
Without this and there should be one layer only.
Matthias
Matthias,
Here is the full code, the 3 layers I need are set between the lines 389 and 430.
Thanks, Best regards,
Laurent
Hi Laurent,
I do see the issue:
Please omit this line and it should be fine.
Here is the explanation:
A layer view can be linked to a data layer by different ways. You picked "source_layer_index". This is fine for now, but it's not applicable in the general case. If the link way always like this, one could not do a "reload" because then the layer indexes may change. Hence the layer views usually use "semantic linking" which is through "source_layer" and "source_datatype". In this case, the views are linked to the data layers by means of invariant layer descriptions.
"add_missing_layers" considers "semantic links" only. If you only have "source_layer_index" links, they are not considered for this update and new semantic links are created. That's what you observe.
Matthias