1. Home
  2. /
  3. Solidworks-api
  4. /
  5. Create a New Part Document

Create a New Part Document - Solidworks-api Typing CST Test

Loading…

Create a New Part Document — Solidworks-api Code

Opens a new part document in SolidWorks via API.

Dim swApp As SldWorks.SldWorks
Dim swPart As ModelDoc2
Set swApp = Application.SldWorks
Set swPart = swApp.NewDocument("C:\ProgramData\SolidWorks\SOLIDWORKS 2023\templates\Part.prtdot", 0, 0, 0)

Solidworks-api Language Guide

SolidWorks API is a COM-based programming interface that allows developers to automate, customize, and extend the SolidWorks CAD software, enabling tasks from simple macros to complex design automation and integration with external systems.

Primary Use Cases

  • ▸Automate repetitive modeling or drawing tasks
  • ▸Create custom add-ins for design processes
  • ▸Integrate SolidWorks with PLM/ERP databases
  • ▸Generate reports and BOMs automatically
  • ▸Custom tools for design validation and rule enforcement

Notable Features

  • ▸COM-based automation interface
  • ▸Supports macros and standalone add-ins
  • ▸Access to all SolidWorks document types (parts, assemblies, drawings)
  • ▸Event handling for real-time customization
  • ▸Extensive object model reflecting SolidWorks entities

Origin & Creator

Developed by Dassault Systèmes, with API support introduced alongside SolidWorks to enable customization and automation.

Industrial Note

Widely used in manufacturing, mechanical design, product lifecycle management, and custom engineering workflows to reduce design time and enforce company-specific standards.

More Solidworks-api Typing Exercises

Add a Sketch on Front PlaneDraw a Line in SketchDraw a Circle in SketchExtrude a SketchCreate a Rectangle SketchApply Fillet to EdgeAdd Material to PartCreate a Circular PatternSave Part Document

Practice Other Languages

CReactPythonC++RustTypeScriptKotlinPHPJavaC#RubyMqlCqlN1qlCypher