1 Reply Latest reply on Feb 15, 2017 5:10 PM by Viktor Bovzdarenko

    Using global variables in PMP controls

    Eric Anderson

      What control type or API coding is required to allow for input of equations or global variables into a custom PMP page box? I would like to give a macro feature I have created the flexibility to accept either a numerical value or input a global variable name into the box and pass the global variable value into the feature. This would be similar functionality to most existing SW features when entering "= VariableName" into the numberbox.

        • Re: Using global variables in PMP controls
          Viktor Bovzdarenko

          Hi Eric,

          "swControlType_Textbox" shold work well for global variables. To add a new global variable a string value is required. It will be resolved to equation by SolidWorks automatically.


          Set pm_Text = pm_Group.AddControl(TextID, swControlType_Textbox, "Text box", swControlAlign_Indent, swControlOptions_Visible + swControlOptions_Enabled, "Text box")

           

          Regards

          Viktor