private string GetPropertiesLocal(string filePath) { string result = ""; try { Inv.ApprenticeServerComponent asc = new Inv.ApprenticeServerComponent(); Inv.ApprenticeServerDocument asd = asc.Open(filePath); // "Inventor Summary Information" Inv.PropertySet ps = asd .PropertySets["{F29F85E0-4FF9-1068-AB91-08002B27B3D9}"]; foreach (Inv.Property p in ps) { result += string.Format("{0}={1};", p.DisplayName, p.Value); } asd.Close(); } catch (Exception ex) { return(ex.Message); } return(result); }
private void SaveWithApprentice() { string NewFolder = "C:\\Temp\\"; string AsmFullFilename = "C:\\Program Files\\Autodesk\\Inventor 2013\\Samples\\Models\\Tube & Pipe\\Tank\\Tank.iam"; Inventor.ApprenticeServerDocument oApprenticeDoc = mApprenticeApp.Open(AsmFullFilename); SaveRec(ref NewFolder, ref oApprenticeDoc); mApprenticeApp.FileSaveAs.ExecuteSaveCopyAs(); oApprenticeDoc.Close(); }