public void SaveAndUpload() { var documentId = CadDms.CreateNewDocumentId(); Save(documentId); var fullpath = AcadApp.DocumentManager.MdiActiveDocument.Name; var dmsDocument = new DmsDocument { DocumentId = documentId, FileContent = File.ReadAllBytes(fullpath), FileExtension = "DWG" }; var result = CadDms.UploadDocument(dmsDocument); if (!result.Success) { MessageBox.Show( string.Format("It was not possible to upload the file!{0}{0}{1}", Environment.NewLine, result.Message), "Save with new ID and upload", MessageBoxButton.OK, MessageBoxImage.Error); } }
public string CreateNewId() { return(CadDms.CreateNewDocumentId()); }
public void SaveWithNewId() { Save(CadDms.CreateNewDocumentId()); }