Home Forums General XMetaL Discussion Getting CRCL Resource locator from file path Reply To: Getting CRCL Resource locator from file path

murray

Reply to: Getting CRCL Resource locator from file path

The 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 );
}

Reply

Products
Downloads
Support