Home Forums General XMetaL Discussion How to include templates in xac file? Reply To: How to include templates in xac file?

Derek Read

Reply to: How to include templates in xac file?

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.

[code]//JScript Example:
var rulesFilePath = ActiveDocument.RulesFile;
var xacFolder = rulesFilePath.substr(0,rulesFilePath.lastIndexOf(“\”));
ActiveDocument.Host.Alert(xacFolder);[/code]

Reply

Products
Downloads
Support