Community Tip - Want the oppurtunity to discuss enhancements to PTC products? Join a working group! X
I'm trying to create a batch file to export an .xml to a .html file.
In Arbortext Editor 6.0 M100 there's a feature that allows you to export a file to .htm
File->Save as HTML
In a batch file I simply used:
"editor.exe" -c "FileSaveAsHTML" "file.xml"
It essentially opens the xml file and a dialog appears to save as an html file.
Is there a way to have this command in silent mode that allows the file to save?
Using the argument "-b" doesn't allow overwrites, which I think the dialog is messing up.
Is there another way to go about doing this? Perhaps a macro would be used instead?
Any suggestions are welcomed.
Solved! Go to Solution.
Hi Michael--
Try using this for the command with the -c switch:
autoload _pubhtml::publish_hfile _pubhtml.acl;_pubhtml::publish_hfile('C:\work\TerraXML\test\Document1.html')
(but replace the hard-coded path there with your own desired output path).
The problem with using FileSaveAsHTML is that it assumes you're running in interactive mode so it tries to ask you about where to store the resulting file.
The _pubhtml package has a variety of functions related to HTML publishing, including publish_hfile(), which just generates the HTML file and saves it without generating any message boxes.
--Clay
Hi Michael--
Try using this for the command with the -c switch:
autoload _pubhtml::publish_hfile _pubhtml.acl;_pubhtml::publish_hfile('C:\work\TerraXML\test\Document1.html')
(but replace the hard-coded path there with your own desired output path).
The problem with using FileSaveAsHTML is that it assumes you're running in interactive mode so it tries to ask you about where to store the resulting file.
The _pubhtml package has a variety of functions related to HTML publishing, including publish_hfile(), which just generates the HTML file and saves it without generating any message boxes.
--Clay
Thanks Clay. Works like a charm.