private bool Manager() { try { List <byte> versionBytes = new List <byte>(); versionBytes.AddRange(majVersionBytes); versionBytes.AddRange(minVersionBytes); versionBytes.AddRange(patVersionBytes); versionBytes.AddRange(intVersionBytes); fileData.AddRange(versionBytes); for (int bit = 0; bit != 72; bit++) { fileData.Add(BitConverter.GetBytes(' ')[0]); } tempWriter.Save(); jointResolver = new JointResolver(currentApplication, tempReader.GetSTLDict()); fileData.AddRange(tempReader.ReadFiles()); byte[] jointBytes; jointBytes = jointResolver.ReadJoints(); if (jointBytes != null) { fileData.AddRange(jointBytes); } Assembler(); return(true); } catch (Exception e) { MessageBox.Show(e.Message + e.StackTrace); return(false); } }
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; }
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; }