5 Replies Latest reply on Jul 11, 2016 12:24 PM by Daniel Mattsson

    Set dimension to global variable C#

    Daniel Mattsson



      Dimension myDimension = default(Dimension);

      myDimension = (Dimension)swModel.Parameter("D1@Sketch1@" + strComponentName);

      myDimension.SystemValue = 0;




      I want to link the value to a global variable as you normaly do in solidworks "="Line1@Assem1.Assembly".


      not retrieving the value from the global variable, then if i change the model i must change the value by code again.


      Anyone could help me? would really appreciate it!

      I might not need help with the code, just an explination how to do it


      Best regards