![]() | PublishManagerExportAttribute Method |
Namespace: VIZPub.NET
public bool ExportAttribute( string input, string output )
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\\ATTRIBUTE.viz"; string output = "C:\\MODEL\\ATTRIBUTE.txt"; bool result = manager.ExportAttribute(input, output); if (result == false) return; VIZPub.NET.AttributeManager attribute = new VIZPub.NET.AttributeManager(); List<VIZPub.NET.AttributeItem> items = attribute.GetAttributeFromExportedFile(output, true); foreach (VIZPub.NET.AttributeItem item in items) { System.Diagnostics.Debug.WriteLine(string.Format("{0} - {1} : {2}", item.NodeId, item.AttributeKey, item.AttributeValue)); } } private void VIZPub_OnProgressChangedEvent(object sender, VIZPub.NET.ProgressEventArgs e) { System.Diagnostics.Debug.WriteLine(string.Format("{0} : {1}", e.Mode, e.Progress)); } } }