Sldprt vs Sldasm vs Slddrw: Key Differences Explained
.sldprt files are individual part models, .sldasm files are assemblies that combine multiple parts, and .slddrw files are 2D drawings created from parts or assemblies for documentation. Each serves a distinct role in the design process: parts for single components, assemblies for grouped components, and drawings for manufacturing details.Quick Comparison
This table summarizes the main differences between .sldprt, .sldasm, and .slddrw files in SolidWorks.
| File Type | Purpose | Contains | Usage | Typical Output |
|---|---|---|---|---|
.sldprt | Single part modeling | 3D geometry of one component | Design individual parts | 3D part model |
.sldasm | Assembly modeling | Multiple parts combined with mates | Build product assemblies | 3D assembly model |
.slddrw | 2D drawing creation | Views of parts or assemblies with annotations | Create manufacturing drawings | 2D technical drawings |
Key Differences
.sldprt files store the 3D shape and features of a single part. They define the geometry, dimensions, and material properties of one component. This file is the building block for all designs.
.sldasm files combine multiple .sldprt files into a single assembly. They include information about how parts fit and move together using mates and constraints. Assemblies help visualize the full product and check for interferences.
.slddrw files are 2D drawings created from parts or assemblies. They contain views like front, top, side, and section views, along with dimensions, notes, and symbols needed for manufacturing or inspection. Drawings communicate design intent clearly to production teams.
Sldprt Example
This example shows a simple SolidWorks macro code snippet to create a new part file (.sldprt) and add a basic sketch.
Dim swApp As Object
Dim Part As Object
Dim boolstatus As Boolean
Sub main()
Set swApp = CreateObject("SldWorks.Application")
swApp.Visible = True
Set Part = swApp.NewDocument("C:\ProgramData\SolidWorks\SOLIDWORKS 2023\templates\Part.prtdot", 0, 0, 0)
boolstatus = Part.SketchManager.InsertSketch(True)
MsgBox "New part created with sketch started."
End SubSldasm Equivalent
This example shows how to create a new assembly file (.sldasm) and insert an existing part into it using SolidWorks macro code.
Dim swApp As Object
Dim Assembly As Object
Dim Part As Object
Sub main()
Set swApp = CreateObject("SldWorks.Application")
swApp.Visible = True
Set Assembly = swApp.NewDocument("C:\ProgramData\SolidWorks\SOLIDWORKS 2023\templates\Assembly.asmdot", 0, 0, 0)
Assembly.InsertNewComponent "C:\Users\User\Documents\Part1.sldprt", 0, 0, 0
MsgBox "New assembly created with one part inserted."
End SubWhen to Use Which
Choose .sldprt when designing or editing a single component. Use .sldasm to combine multiple parts into a product or subassembly to check fit and function. Use .slddrw to create detailed 2D drawings for manufacturing, inspection, or documentation based on parts or assemblies. Each file type fits a clear step in the product design workflow.
Key Takeaways
.sldprt files are for individual 3D parts..sldasm files combine parts into assemblies with relationships..slddrw files create 2D drawings for manufacturing and documentation.