Save PDF, Dwg and Step with REVISION V1.1 Full

Modificato il: settembre 02,2023  
Votazione
Download: 471  
Commenti

Specifiche

Download:471
Descrizione:This macro automates the process of saving SolidWorks drawings, their associated 3D models, and managing custom properties based on certain criteria. Users can use this macro to streamline their workflow when working with SolidWorks drawings. 1-Check if a Drawing is Open: The macro starts by checking if a drawing document is open. If not, it displays an error message and exits. 2-Get Drawing Information: It gets information from the opened drawing, such as file path. 3-Check and Create PDF Folder: It checks if a folder named "PDF" exists in the same directory as the drawing file. If not, it creates the folder. 4-Get the Second View: It gets the second view in the drawing (if available). 5-Get Custom 2D Drawing Properties: It attempts to get custom properties like "Draw number," "Description," and "Revision" from the drawing. 6-Get 3D Model Properties: If the 2D drawing properties are not set, it attempts to get these properties from the referenced 3D model. 7-Check for Empty Properties: It checks if any of the properties (drawNumber, description, revision) are empty. If they are, it displays an error message. 8-Generate File Names: It generates file names for PDF, DWG, and STEP files based on the properties. 9-Save Drawing as PDF: It saves the drawing as a PDF file in the "PDF" folder. 10-Check PDF Saving Success: It checks if the PDF file was saved successfully. 11-Check and Create DWG Folder: It checks if a folder named "DWG" exists in the same directory as the drawing file. If not, it creates the folder. 12-Save Drawing as DWG: It saves the drawing as a DWG file in the "DWG" folder. 13-Call SaveModelAsSTEP: It calls the SaveModelAsSTEP subroutine to save the referenced 3D model as a STEP file if it's not an assembly. 14-SaveModelAsSTEP Subroutine: This subroutine checks if the document is a part (not an assembly), edits and rebuilds the 3D model, and then saves it as a STEP file in the "STEP" folder. 15-IsDrawing and IsAssembly Functions: These f
    Pre-condizione: Run the macro with an open drawing right after you have edited the code with the custom properties that are found in the file.
  Post-condizione: This macro, when launched in the design environment, will create subfolders within the directory where the files are, and will save the design as .pdf and .dwg, it will also save the file associated with the design file as .step, if the file has a revision the files will be saved with the revision exponent. Finally, all files will be saved in their respective folders.
Versione SOLIDWORKS: Any
Lingua di programmazione: SW_VBA

 


Le macro possono contenere virus o altre minacce per la sicurezza. SOLIDWORKS Corporation non ha verificato che le macro pubblicate su questo sito siano sicure e che provengano da una fonte sicura.

Fare il download della macro SOLIDWORKS.

 

(Login richiesto)  

Contribuente
Altri contributi da questo utente

 

 

 

Macro
Matheus Piccolo

Utente dal: 11/09/2012
Titolo: Designer
 
Caratteristiche:
Interessi:
 
  Rapporto utente inappropriato
Rapporto commento non appropriato