Home › Forums › General XMetaL Discussion › Getting CRCL Resource locator from file path › Reply To: Getting CRCL Resource locator from file path
Reply to: Getting CRCL Resource locator from file path
August 4, 2010 at 8:06 pmThe following code works for me. Note that it will do nothing if the file was opened from the file system because Application.ActiveDocument.CRLocator will be null. However if the file was opened from the repository it should display the repository id of the active document.
// XMetaL Script Language JSCRIPT:
if( Application.ActiveDocument.CRLocator )
{
Application.Alert( Application.ActiveDocument.CRLocator.resourceID );
}