It looks like you're new here. If you want to get involved, click one of these buttons!
I am making a program who draws/erase markers and labels on a design, and I would like to make sure that the design is not saved at the end.
I was wondering If it was possible to enable this with klayout without having to force the file a read-only:
in viewing mode:
Myshape = .shapes(layer).insert(shape)
.shapes(layer).erase(Myshape)
(main issue)in editing mode:
Myshape = .shapes(layer).insert(shape)
.shapes(layer).erase(Myshape)
My ideal mode:
Myshape = .shapes(layer).insert(shape)
.shapes(layer).erase(Myshape)
Comments
Hello,
formally, in viewer mode, even insert should not be possible
The reason why erase isn't possible is not the mode, but the memory layout: in viewer mode, a compact memory layout is used and shapes may be stored as shape repetitions (specifically with OASIS input). Adding single shapes isn't a problem then, but erasing a shape potentially involved resolving these arrays. There are manifold data consistency issues lurking, so I did not implement this.
But I think maybe there is a different solution: if you application is to provide some overlay layout (markers?), you could create a second layout (editable), fill that with your shapes and overlay this layout in the view (as a second cellview). So you have one view essentially and one is view-only, the other one is editable.
Matthias