10 Replies Latest reply on Oct 4, 2017 2:21 PM by Elisabeth Daley

    Input formula won't evaluate

    Kristan Sears

      I am trying to get a simple arithmetic formula to update on the data card.  According to PDM help, I should be able to evaluate $Add(11.2,3).  But nothing shows up in the Edit box on the data card.

       

      The only flags that have been set are, "Show in Explorer"  All other flags are turned off.

       

      Any advice would be appreciated.

       

      Thanks,

      -Kristan

        • Re: Input formula won't evaluate
          Michael Dekoning

          Input formulas don't evaluate unless an update is made in the card by the user. Typically, you use an input formula to take the variable value from a card input and alter it in some way. Since your example doesn't have a variable in it, there is nothing to trigger the formula to evaluate. So if you had a numeric variable and wanted to add 3 to it, you would use the formula you asked about.

           

          Mike

          CEPA

            • Re: Input formula won't evaluate
              Kristan Sears

              Michael,

                   Thanks for the reply.  This example I gave is directly from the SolidWorks Online Help documentation.

              I've created variables for the two values that I want to use, I've checked out the document, modified the values of the variables on the data card, and checked the file back in.  The field on the data card doesn't evaluate when the values are changed.

               

              The other note is that the syntax given in the Help Documentation (link above) is different than the syntax when implementing the formula in the Admin tool.  For example, Divide appears as $Div(11.2,3).  This is exaclty how it appears when you select the divide function, and it's default values.  I've replaced the two numbers with the variables I want to use.  I've manually input numbers into the data card for those variables, checked the file in and out, and there's no change to the field that should contain the result.

               

              I'm using EPDM 2013.

              Thanks,

              -Kristan

                • Re: Input formula won't evaluate
                  Michael Dekoning

                  Thanks for the clarification. You should see the result of the input formula immediately when you input values in the card. We are still on EPDM 2012. However, I have EPDM 2014 beta set up on a machine for evaluation. I set up a data card with 3 textboxes and added the following input formula.

                  CaptureNo.JPG

                  As I input values, the result is as expected. Maybe a problem with EPDM 2013?

                    • Re: Input formula won't evaluate
                      Kristan Sears

                      Michael,

                           You point is well-taken.  These formulas work fine as long as they are directly populated with user input from the data card.   I tried the formulas as you indicated and they calculated correctly.

                       

                      What I was attempting to do was to drive the calculation based on input values from custom properties in a PPT document.

                       

                      The driving values were/are being updated on the data card.  But without user input in one of the fields, the calculations weren't being updated.  CPI and SPI are the calculated values.  BCWP, BCWS, and ACWP are inputs from the custom properties in the document.  If I open the document, change the values, save, and close, the data card reflects those changes.  I have to put my cursor in one of the three fields and give it an input, space & backspace, and the calculated fields will update correctly.

                      data card.png

                      So the questions is, how can I create an action that forces the input fields to be updated as though they are receiving user input without the need to give user input to the data card?  I want to have the input fields be driven by the document only, so that a user can't modify the data card directly.  These should be read-only fields, so that the values can only come from the document itself and not from the user.

                       

                      Thanks for your help.

                       

                      -Kristan

                • Re: Input formula won't evaluate
                  Thys Coetzee

                  Any new information on this as yet? 

                   

                  I can't get any of the controls to supply a useful event.

                   

                  --Thys

                    • Re: Input formula won't evaluate
                      Tom Cote

                      Hi Thys,

                       

                      Looks like I'm facing the same type of issue.  I'm assigning a serial number to a "Number" variable on a data card, I then need to strip some information off of that number variable and assign it to a different variable.  Sounds easy (using the formula function inside the data card) but since these formulas will not activate except for fields (variables) that you're actively typing into it will not work.  I too cannot get it to have an event that makes the formula function.  I've even tried a transition, you would think that would be a pretty major event.

                       

                      VERY frustrating that SOLIDWORKS gives us these features but they have sooooo many limitations.

                        • Re: Input formula won't evaluate
                          Thys Coetzee

                          Tom,

                           

                          I took to rum to appease the agony, but now I'm back and digging for solutions.  Upshot is that I create INCREDIBLY long formulae that build the various pieces I need in different places from something like a serial number.

                           

                          This flat out doesn't work:

                          z = f(serNo),   so then y = f(z) and then x = f(y)  expecting the variable change to cascade.

                           

                          This did work:

                          z = F(serNo)  and y = G(serNo) + F(serNo)  and x = H(serNo) + G(serNo) + F(serNo)

                           

                          Agreed -- VERY frustrating.

                           

                          All the best,

                          Thys

                            • Re: Input formula won't evaluate
                              Nick Simonovski

                              Hi Guys,

                               

                              I've got the same issue where a field in the data card that is controlled by an Input Formula will not update unless the field in the data card is modified through the data card itself. An update to the fields via the Custom Properties in Solidworks do not cause the Input Formula to be updated.

                               

                              Is there a workaround that anybody has been able to get successfully working for this issue?

                               

                              Cheers,

                              Nick

                        • Re: Input formula won't evaluate
                          Elisabeth Daley

                          I'd like this too.  Just submitted enhancement request 1-15102106947.