Reply to: Getting CRCL Resource locator from file pathAugust 4, 2010 at 8:06 pm
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 );