My company does not have PDM at the moment so I've been looking for ways around revision controls. I've developed a macro that handles revisions for each file type. For a part or assembly, it saves a copy of the file to an "Archive" folder in its current directory with " - Rev #" attached to the end of the file name depending what rev level is indicated in the custom properties. It then adds the new "Rev#" and "Rev#Date" to the custom properties. My problem arises when I have an assembly open that would like to add a revision to and a part in that assembly is opened. That part may or may not have been have been changed but when the macro tries to save the assembly, it says that it needs to save the opened part. If I click no, which is what I need, it cancels the save but still adds the new Rev# and Rev#Date to the custom properties. I would like to know if there is any way I could code in to check if the parts need to be saved. If there isn't, is there any way to tell the macro to stop if there is a warning interupting it? I've attached the .swp.
SolidworksApi macros