Sample library, test button and code as follows. Test output correctly returns the real full path including filename but the pathpart property is undefined.
testItem.realpath = C:\Users\admin\Videos\choices.mp4
testItem.realpath.pathpart = undefined
Realpath.dcf (1.3 KB)
function OnClick(clickData)
{
// --------------------------------------------------------
DOpus.ClearOutput();
// --------------------------------------------------------
var cmd = clickData.func.command;
cmd.deselect = false; // Prevent automatic deselection
// --------------------------------------------------------
var files = clickData.func.sourcetab.files;
if (files.count==0) return;
var testItem = files(0);
DOpus.Output("testItem.realpath = "+testItem.realpath);
DOpus.Output("testItem.realpath.pathpart = "+testItem.realpath.pathpart);
// --------------------------------------------------------
}