[Pythoncad-developer] Save as Functionality
CAD Application entire developed in Python
Status: Beta
Brought to you by:
matteoboscolo
From: Matteo B. <mat...@bo...> - 2010-05-21 10:51:34
|
Hi Gertwin, Now the application have a new method to save the current file savaAs function .. def saveAs(self, newFileName): """ seve the current document to the new position """ if self.__ActiveDocument: oldFileName=self.__ActiveDocument.getName() self.closeDocument(oldFileName) shutil.copy2(oldFileName,newFileName) self.openDocument(newFileName) as you can see from the code to perform a save as command I do in the following way: 1) Close the actual file 2) Save the oldfile in a differen position 3) And reopen it .. I do not know some different way to perform such a operation .. Do you have any different idea to perform such a command? Regards, Matteo |