Storing parameters in SOLIDWORKS macro feature

Edit ArticleEdit Article

Parameters are any additional metadata required by the macro feature. Currently only primitive types of parameters are supported (i.e. string, bool, double, int etc.)

public class MacroFeatureParams
    public string Parameter1 { get; set; }
    public int Parameter2 { get; set; }

//this macro feature has two parameters (Parameter1 and Parameter2)
public class MyMacroFeature : MacroFeatureEx<MacroFeatureParams>


All articles and code at CodeStack are now open-source and hosted on GitHub. If you want to contribute by modifying existing articles and code snippets, submitting new ones, reporting errors and bugs etc. please follow this blog post for more information. We appreciate any contribution.

Product of Xarial Product of Xarial