13 Replies Latest reply on Jan 8, 2016 11:13 AM by Ivana Kolin

    Variable not accepted

    Willem Van Opstal

      I created a small macro for changing all sorts of dimensions and configurations. Everything works well, apart of one variable from my userform being not accepted.

       

      Dim dblRatio As Double

      dblRatio = CDbl(txtRatio.Text / 100)

       

      boolstatus = Part.Extension.SelectByID2("RectThickness@Cross Section Dimensions@Bicycle Rack Assy.SLDASM", "DIMENSION", 0, 0, 0, False, 0, Nothing, 0)

      Part.Parameter("RectThickness@Cross Section Dimensions").SystemValue = dblRectT

       

      swEquationMgr.SetEquationAndConfigurationOption 4, """Ratio"" = dblRatio", swAllConfiguration, Empty

       

      Example for editing the smart dimensions. In this one, 'dblRectT' works perfectly.But with changing the global variable 'Ratio', the input data isn't recognized/accepted. Replacing the 'dblRatio' with a number, works.

      Also, if I replace 'dblRectT' with 'dblRatio', it works fine changing normal dimensions. Am I missing something here within the swEquationMgr?

       

      Any suggestions?