3 Replies Latest reply on Jan 5, 2014 9:59 AM by Deepak Gupta

    Select Configuration Before Save

    Test Test

      Hi there,

      I'm a newbie with SolidWorks API and I need to select a specific configuration before save as PDF3D (e.g. this/active/current configuration).

      How can I achieve that? I'm currently using C#, but VB will be also fine.

        • Re: Select Configuration Before Save
          Deepak Gupta

          Welcome to SolidWorks Forums.


          Not in front of SW or my pc (using my phone at the moment) but you may find this helpful




          Basically you can show/activate the required config and then save the file as 3d PDF.


          In case you're looking for something that will list the available configuration in a files then you may use the code from this macro DeleteSelectConfigs by Lenny.


          DeleteSelectConfigs is a simple macro that displays a list of the current configurations in a SolidWorks model prior to deleting these configurations, except for the current configuration. The current configuration cannot be deleted. The name of the current configuration is displayed under the list of configurations. The user can then select the configurations that are to be deleted.


          You might also find this post helpful for your future reference.

            • Re: Select Configuration Before Save
              Test Test

              Hi Deepak Gupta, thanks for your help.

              Unfornately I don't know the name of the current configuration (I must be as general as possible).

              I need something like what I use when I change a quota value:


              swDim.SetSystemValue3(value, (int)swInConfigurationOpts_e.swThisConfiguration, null);


              I'll look through the macro you posted for something similar, after retrieving the current configuration.



              EDIT: I think I've solved this way:




              Is that correct? It seems to work.