How can plug-in access cursor position in edited program?

I’d like a plug-in to edit the program editor’s active window at the current cursor position, but I cannot find the line number.

USR6004N provides the line number but looks to its own studio interface and therefore finds no active program when called by the plug-in.

But if I access the ActiveObject of the studio interface passed to the plug-in, how can I find out what line number the cursor is currently on?

FYI
I raised this query in support and the reply was it can’t be done yet.
There is a possibility of this capability being added in future.