Altova StyleVision 2025 Enterprise Edition

After you have started the application as shown in Start Application, you will most likely want to programmatically open a document in order to work with it. The JScript code listing below illustrates how to open two documents from the StyleVision Examples folder.

 

 

// Locate examples via USERPROFILE shell variable. The path needs to be adapted to major release versions.
objWshShell = WScript.CreateObject("WScript.Shell");
majorVersionYear = objStyleVision.MajorVersion + 1998
strExampleFolder = objWshShell.ExpandEnvironmentStrings("%USERPROFILE%") + "\\My Documents\\Altova\\StyleVision" + majorVersionYear + "\\StyleVisionExamples\\";
 
// Tell StyleVision to open two documents. No dialogs
objDoc1 = objStyleVision.Documents.OpenDocument(strExampleFolder + "OrgChart.pxf");
objStyleVision.Documents.OpenDocument(strExampleFolder + "BiggestCitiesPerContinent.sps");

 

 

The JScript code listed above is available in the sample file DocumentAccess.js (see Example Files).

© 2018-2024 Altova GmbH