CADLab Documentation

Version 1.1

CADLab Essentials


CADLab is a MATLAB toolbox that enables MATLAB to communicate with Computer Aided Design and Manufacturing software (CAD) systems namely SolidWorks.

CADLab gives direct access to SolidWorks functionality, Modeling data and Simulation data via MATLAB classes. The MATLAB classes in CADLab closely map to the SolidWorks API interface. Thus CADLab enables you to write m based scripts just like you would write Visual Basic based macros for SolidWorks.


CADLab on its own is an extremely light-weight product. It however requires a system capable of running MATLAB and SolidWorks side-by-side. Please see the system requirements for these two products. CADLab expects that MATLAB and SolidWorks are both installed on the same system.

             Presently CADLab is compatible with MATLAB 2008b 
             or later and SolidWorks 2009SP1 or later.


Installing CADLab

CADLab requires MATLAB and SolidWorks installed on the same system. So you must install these software systems before installing CADLab.

You must have a CADLab passkey to install the product. If you do not have one please email to get one.

Please see the full License Agreement for more details.

Once you have a passkey please follow the instructions below:

             1. Extract the zip file to a temporary location (say `C:\foobar`)
             2. Launch MATLAB and run the m file 
                C:\foobar\CADLab\Installer\CADLab_install ( <passkey>). 
                You can run it without any arguments to see the license agreement.
             3. It will ask you to accept the license agreement. If you do accept the 
                terms please type `yes` in the MATLAB prompt and hit ENTER.
                The installer will copy the files, add path and register the dlls and 
                finally prompt you when it is done.

All CADLab commands start with `CADLab`. So you can type CADLab in MATLAB prompt and do tab-complete to see them.

Finally if you wish to see what version of CADLab you are using simply type `ver` in the MATLAB command prompt.

Uninstalling CADLab
             If you wish to uninstall CADLab simply launch MATLAB and run 
             [matlabroot `\toolbox\CADLab\Installer\CADLab_uninstall`];


All CADLab demos start with 'CADLabDemo'. You can type this in the MATLAB command prompt and use tab-complete to see the list of demos.

The demos included are:

             1. PartAssemInteraction - Shows how to use CADLab to interact with
                parts and assemblies in general
             2. HGUIWrench - Demonstrates how to control SolidWorks Animator using CADLab
             3. HGUICantilever - Demonstrates how to use CADLab to change dimensions of a part
             4. ConstraintAnimation - Demonstrates animating a SolidWorks assembly
                while respecting the mate constraints in nthe assembly. 
             5. FEACantilever - Demonstrates a FEA analysis on a part with a pre-defined 
                Simulation Study. You MUST have a license of SolidWorks Simulation for 
                this demo to work.
             6. CADLabDemo_PlantController - Demonstrates running a SolidWorks Motion 
                calculation in a close loop with MATLAB. The SolidWorks Motion Study 
                acts as a plant and MATLAB acts as a controller for that plant.
                You MUST have a license of SolidWorks Motion for this demo to work.
             7. CADLabDemo_AssemblyTraversal - Demonstrates traversing a SolidWorks 
                assembly and listing all its sub-assemblies and parts.


Type `CADLabHelp` in MATLAB command prompt to launch CADLab's user guide.

CADLab is developed and distributed by FiniteBusiness Inc. (


Useful Knowledge Base



             * CADLab is a registered trademark of FiniteBusiness Inc.
             * MATLAB is a registered trademark of The MathWorks Inc.
             * SolidWorks is a registered trademark of SolidWorks Corporation.