このサイトをビューするために JavaScript を有効化してください。

Altova StyleVision 2020 Enterprise Edition

The code snippets below (from the AutomateStyleVision example) show how two files are opened via two separate methods assigned to two buttons in the user interface. Both methods use the same Application API access mechanism: Documents.OpenDocument(string).

 

The AutomateStyleVision example (see the file Form1.cs) is located in the C# folder of the API Examples folder:

 

Windows 7、Windows 8、Windows 10

C:\Users\<username>\Documents\
Altova\StyleVision2020\StyleVision

 

You can compile and run the project from within Visual Studio 2010/2012/2013/2015/2017/2019.

 

 

Code snippet

 

       // Handler for the "Open OrgChart.pxf" button

      private void openOrgChart_Click(object sender, EventArgs e)

       {

          // Make sure there's a running StyleVision instance, and that it's visible

           StartStyleVision_Click(null, null);

 

          // Open a sample files installed with the product.

           StyleVision.Documents.OpenDocument(strExamplesFolder + "OrgChart.pxf");

           updateListBox();

       }

 

      // Handler for the "Open MultiFileOutput.sps" button

      private void openMultiFileOutput_Click(object sender, EventArgs e)

       {

          if (StyleVision == null)

               StartStyleVision_Click(null, null);

 

          // Open one of the sample files installed with the product.

           StyleVision.Documents.OpenDocument(strExamplesFolder + "MultiFileOutput.sps");

           updateListBox();

       }

 

The file opened last will be the active file.

 

(C) 2019 Altova GmbH