Rename script OnGetNewName() as ADD-IN

So I finally got addin scripts working. I can click a button and run addin script. Biggest issue I am having is getting a RENAME SCRIPT (placed into an addin script) to work. Actually the code works - but the selected DOPUS files do not pass to the OnGetNewName() in the addin script.

function OnGetNewName(getNewNameData) {
	DOpus.Output("OnGetNewName function called.");

	var strExtension = String(getNewNameData.newname_ext_m);
	var strNameOnly = String(getNewNameData.newname_stem_m);
	var newStr = strNameOnly
	var orig = strNameOnly

these are the first few lines on the addin code. I know its running ok since I get this msg:

OnGetNewName function called

But the SELECTED FILES OBJ is not being passed.

Any ideas where my snafu is ?

Rename scripts (via OnGetNewName) are really only meant to be used from the rename tool.

You can use them from a button if you really want, but there's no way to use them as a script add-in.

What is it you're really trying to achieve?

Much nicer to use VSCODE for editing - can only do that with user addins (as far as I understand)