0
0
Arm-architectureComparisonBeginner · 4 min read

Sldprt vs Sldasm vs Slddrw: Key Differences Explained

In SolidWorks, .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 TypePurposeContainsUsageTypical Output
.sldprtSingle part modeling3D geometry of one componentDesign individual parts3D part model
.sldasmAssembly modelingMultiple parts combined with matesBuild product assemblies3D assembly model
.slddrw2D drawing creationViews of parts or assemblies with annotationsCreate manufacturing drawings2D 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.

vb
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 Sub
Output
A new SolidWorks part document opens with an active sketch.
↔️

Sldasm Equivalent

This example shows how to create a new assembly file (.sldasm) and insert an existing part into it using SolidWorks macro code.

vb
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 Sub
Output
A new SolidWorks assembly document opens with the specified part inserted.
🎯

When 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.
Use parts to design components, assemblies to build products, and drawings to communicate details.
Each file type supports a distinct phase in SolidWorks design and production.