API: How to call a method in a .NET addin from a macro

Document created by Robin Richter on Feb 2, 2011Last modified by Joyce Bossom on Nov 2, 2017
Version 6Show Document
  • View in full screen mode

The attached example shows how to call a method in a .NET addin from a VBA macro.  To run the sample, load the addin into SolidWorks, then run the macro.  A message box will appear if it executes successfully.


Note:  This will not work with C# or early bound VB.NET macros.  Referencing a COM interface that was exported from a .NET assembly is not allowed in .NET.


- Subscription Services required for full access.

- Looking for more API Examples?


Copyright © 2010 Dassault Systèmes SolidWorks Corp. All rights reserved.
Do not distribute or reproduce without the written consent of Dassault Systèmes SolidWorks Corp.