Plugin- Open overlayFeatureFormDrawer for a specific layer name

I’m trying to create a plugin with a button to begin adding a feature for a specific hardcoded layer name, almost like a shortcut. Existing code snippets I’ve found only seem to work on the currently selected layer (which wouldn’t be a ‘shortcut’ in reality since it’d require going to the menu, selecting the layer, then clicking the shortcut button).

I don’t see anything immediately obvious in the layertreemodel but I could be missing something

Can anyone offer some help on how to add a feature for a specific named layer?

Take a look at my quick capture plugin. There’s some functions there for listing layers and creating features.

1 Like

Great- thank you!

I actually found a more straightforward example/closer to what I was after in the ‘VocalPoint’ plugin