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

수정된 날짜:: 9월 02,2023  
등급
다운로드: 840  
코멘트

스팩

다운로드:840
설명: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
    전제 조건: Run the macro with an open drawing right after you have edited the code with the custom properties that are found in the file.
  사후 조건: 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.
SOLIDWORKS 버전: Any
프로그래밍 언어: SW_VBA

 


매크로에는 바이러스나 기타 보안 위험이 있을 수 있습니다. SOLIDWORKS Corporation에서는 이 사이트에 게시된 매크로가 안전한지 그리고 신뢰할 수 있는 소스에서 왔는지 확인하지 않습니다.

SOLIDWORKS 매크로를 다운로드하십시오.

 

(로그인 필수)  

제공자
이 사용자의 다른 제공 항목

 

 

 

매크로
Matheus Piccolo

가입 날짜: 2012-09-11
제목: Designer
 
기술:
관심:
 
  부적절한 사용자 보고
부적절한 코멘트 보고