C++ Add-in example to Create a Macro Feature

Document created by Michael Kozikowski Employee on Jan 22, 2021
Version 1Show Document
  • View in full screen mode

This is a Vikrant Udawant add-in example which illustrates creation of a macro feature using IFeatureManager::InsertMacroFeature3  API. It shows how to create a multibody macro feature.

 

Key details:

  1. The addin creates a command group named "SwCppAddinMF"  and adds a toolbar item named "Insert Macro Feature" to it. The relevant implementation code can be found in item's callback function "ToolbarCallback0"

 

  1. The addin class  implements the ISwComFeature interface. This interface has three methods that must be implemented:

ISwComFeature::Edit()

ISwComFeature::Regenerate()

ISwComFeature::Security()

 

  1. After successfully building and registering the addin, open existing or a new part document in SOLIDWORKS and Click Tools > SwCppAddinMF > Insert Macro Feature.

Attachments

Outcomes