Reply to: How to include templates in xac file?July 23, 2010 at 1:03 am
Files you place inside an XAC file will be extracted to a temp folder when that XAC file is used. You can locate this folder using script by asking the product where the schema (DTD or XSD), complied schema or CSS file is located.
ActiveDocument.RulesFile tells you where the schema is.
ActiveDocument.DisplayStylesFile tells you where the CSS file is.
In both cases, provided they have been extracted from an XAC file the path will be the same and all other files extracted from the XAC should be there too.
The following shows one way to extract just the path from those properties. We do not have a dedicated API for providing just the folder path at this time.
var rulesFilePath = ActiveDocument.RulesFile;
var xacFolder = rulesFilePath.substr(0,rulesFilePath.lastIndexOf(“\”));