Is there a way to query active layer?

I’m working on a plugin to create a graphic and want to put the segments on whatever layer is selected as the active layer. How do I do that in an action plugin?
I was hoping that it was as easy as not calling seg1.setLayer() but then the layer defaults to F.Cu even though Eco2.User is selected as the working layer.

Unfortunately I am not aware of any such API call that would help you. Would be a nice addition though.

This topic was automatically closed 90 days after the last reply. New replies are no longer allowed.