![]() | PublishManagerExportNodeImage Method |
Namespace: VIZPub.NET
public bool ExportNodeImage( string input, string output, int width, int height, ViewDirections viewDirection, ImageFormats imageFormat, ExportNameFormats nameType )
using System; using System.Collections.Generic; using System.Linq; using System.Text; namespace Examples { public class VIZPubExample { public void Example() { // Initialize VIZPub.NET VIZPub.NET.ModuleInitializer.Run(); // Construction VIZPub.NET.PublishManager manager = new VIZPub.NET.PublishManager(); // License VIZPub.NET.LicenseManager.LicenseResults authResult = manager.License.LicenseFile("C:\\License\\VIZPub.NET.lic"); if (authResult != VIZPub.NET.LicenseManager.LicenseResults.SUCCESS) { System.Diagnostics.Debug.WriteLine(authResult.ToString()); return; } // Event :: Progress manager.OnProgressChangedEvent += VIZPub_OnProgressChangedEvent; string input = "C:\\MODEL\\SAMPLE.viz"; string output = "C:\\MODEL"; bool result = manager.ExportNodeImage( input /* INPUT : VIZ */ , output /* OUTPUT : IMAGE */ , 600 /* IMAGE WIDTH */ , 480 /* IMAGE HEIGHT */ , VIZPub.NET.ViewDirections.ISO_PLUS /* VIEW DIRECTION */ , VIZPub.NET.ImageFormats.PNG /* OUTPUT FORMAT */ , VIZPub.NET.ExportNameFormats.NODE_ID /* FILE NAME FORMAT */ ); System.Diagnostics.Debug.WriteLine( string.Format("Elapsed Milliseconds = {0:#,0}", manager.ElapsedMilliseconds) ); } private void VIZPub_OnProgressChangedEvent(object sender, VIZPub.NET.ProgressEventArgs e) { System.Diagnostics.Debug.WriteLine( string.Format("{0} : {1}", e.Mode, e.Progress) ); } } }