示例#1
0
 /// <summary>
 /// Constructor for the field saver object which will begin the export process
 /// </summary>
 /// <param name="currentApplication"></param>
 /// <param name="fieldDataList"></param>
 public FieldSaver(Inventor.Application currentApplication, ArrayList fieldDataList)
 {
     try
     {
         if (System.IO.File.Exists(filePath + currentApplication.ActiveDocument.DisplayName.Substring
                                       (0, currentApplication.ActiveDocument.DisplayName.Length - 3) + "field"))
         {
             DialogResult dialogResult = MessageBox.Show("This file already exists, would you like to replace it?", "Error", MessageBoxButtons.YesNo);
             if (dialogResult == DialogResult.Yes)
             {
                 System.IO.File.Delete(filePath + currentApplication.ActiveDocument.DisplayName.Substring
                                           (0, currentApplication.ActiveDocument.DisplayName.Length - 3) + "field");
             }
             if (dialogResult == DialogResult.No)
             {
                 throw new Exception();
             }
         }
         majVersionBytes         = BitConverter.GetBytes(majVersion);
         minVersionBytes         = BitConverter.GetBytes(minVersion);
         patVersionBytes         = BitConverter.GetBytes(patVersion);
         intVersionBytes         = BitConverter.GetBytes(intVersion);
         tempReader              = new TempReader((AssemblyDocument)currentApplication.ActiveDocument, fieldDataList);
         tempWriter              = new TempWriter(currentApplication, (currentApplication.ActiveDocument).Thumbnail, fieldDataList);
         this.currentApplication = currentApplication;
     }
     catch (Exception e)
     {
         return;
     }
 }
示例#2
0
 public FieldSaver(Inventor.Application currentApplication, ArrayList fieldDataList)
 {
     tempReader              = new TempReader((AssemblyDocument)currentApplication.ActiveDocument, fieldDataList);
     tempWriter              = new TempWriter(currentApplication, ((AssemblyDocument)currentApplication.ActiveDocument).Thumbnail, fieldDataList);
     jointResolver           = new JointResolver(currentApplication, tempReader.getSTLDict());
     this.currentApplication = currentApplication;
 }
示例#3
0
 public RobotSaver(Inventor.Application currentApplication, ArrayList jDataList)
 {
     foreach (JointData joint in jointDataList)
     {
         jointDataList.Add(joint);
     }
     tempReader              = new TempReader((AssemblyDocument)currentApplication.ActiveDocument);
     tempWriter              = new TempWriter(currentApplication, ((AssemblyDocument)currentApplication.ActiveDocument).Thumbnail);
     jointResolver           = new JointResolver(currentApplication, tempReader.getSTLDict(), jointDataList);
     this.currentApplication = currentApplication;
 }