Hide Table of Contents
Getting Started

Implementing SolidWorks eDrawings API as Microsoft ActiveX control

The SolidWorks eDrawings API is implemented as a Microsoft ActiveX control.

  1. To create an entry point into the SolidWorks eDrawings API in VBA add an eDrawings 20XX Control to the Controls Toolbox and drag and drop the control to a user form or dialog. 

    NOTE: EModelView.dll is an ActiveX control that is registered as eDrawings 20XX Control when it is installed in \Program Files\SolidWorks Corp\SolidWorks eDrawings.

  2. Access the EModelViewControl variable representing the control in the form and experiment with some of the SolidWorks SolidWorks eDrawings API calls. For example, try using IEModelViewControl::OpenDoc to open an SolidWorks eDrawings or SolidWorks document in the control or IEModelViewControl::ViewOrientation to change the current view of the document in the control.

Instantiating SolidWorks eDrawings control

You can instantiate the SolidWorks eDrawings control using a version-specific or version-independent CLSID.

To get your SolidWorks eDrawings control's CLSIDs:

  1. Run Microsoft Visual Studio OLE/COM Object Viewer tool.

  2. Open \Program Files\SolidWorks Corp\SolidWorks eDrawings\EModelView.dll.

    • Version-specific CLSID:

      1. View coclass EModelViewControl.

      2. Copy the value in the (uuid) attribute.

    • Version-independent CLSID:

      1. View coclass EModelNonVersionSpecificViewControl.

      2. Copy the value in the (uuid) attribute.

It is recommended that you use the version-specific CLSID, and Microsoft Visual Studio will select it by default. However, because the CLSID is version-specific, with each new release of SolidWorks eDrawings you must edit:

  • your application.

  • any HTML pages that reference the version-specific CLSID.

Although you do not need to edit your application when working with multiple versions of SolidWorks eDrawings when using the version-independent CLSID, if your application uses a newer API than present in an older version of SolidWorks eDrawings installed by your user, your application will not work properly. This scenario can be difficult to debug remotely, especially with HTML applications.



Provide feedback on this topic

SOLIDWORKS welcomes your feedback concerning the presentation, accuracy, and thoroughness of the documentation. Use the form below to send your comments and suggestions about this topic directly to our documentation team. The documentation team cannot answer technical support questions. Click here for information about technical support.

* Required

 
*Email:  
Subject:   Feedback on Help Topics
Page:   Getting Started - eDrawings.Interop.EModelViewControl
*Comment:  
*   I acknowledge I have read and I hereby accept the privacy policy under which my Personal Data will be used by Dassault Systèmes

Print Topic

Select the scope of content to print:

x

We have detected you are using a browser version older than Internet Explorer 7. For optimized display, we suggest upgrading your browser to Internet Explorer 7 or newer.

 Never show this message again
x

Web Help Content Version: API Help (English only) 2010 SP05

To disable Web help from within SOLIDWORKS and use local help instead, click Help > Use SOLIDWORKS Web Help.

To report problems encountered with the Web help interface and search, contact your local support representative. To provide feedback on individual help topics, use the “Feedback on this topic” link on the individual topic page.