11 Replies Latest reply on Sep 19, 2018 3:47 PM by Glenn Schroeder

    Equations for dummies

    Josee Laplante

      Hi to all,

       

      Often I would like to insert equations in my models to make them more adaptive but equations and programming have never been my strength. Each time I do it takes forever of trial and error because I am utterly confused with all the different views in the dialog box and wonder under which to enter my equation. How do i know if I need to type " or ' ? How can I access all the sketch dimensions if I'm trying to create an equation in the first view? I browsed thru the Equation help but there is a lot of information and no examples.

       

      Does someone know of a blog, video or website to suggest that I could read or look at that would provide the basic guidelines with graphic help?

       

      T

        • Re: Equations for dummies
          Aleksander Ksiezopolski

          Hi!

           

          I propose to try use design table in Excel. I hope that you know Excel and its functions. Maybe it could be easiest for you?

           

          Regards

          Alek

          • Re: Equations for dummies
            Glenn Schroeder

            Start small and simple.  Global Variables are pretty easy to set up and use.  One good thing about them is the flexibility in how they're used and created.  You can assign a to a single constant value, and link all features to this global variable, or have the global variable linked to a feature dimension, and then use the global variable for other features.  By using this method if the value is edited in the first feature then the changes will be reflected in all places where the global variable is used.

             

            When you get ready to use a global variable just hit the Equal key on your keyboard where you'd ordinarily enter a dimension value to get the drop-down that allows you to choose your global variable.

             

            To show dimensions in the graphics area you can click on the feature (or double-click if you don't have Instant 3d turned on), then click on the desired dimension to link to it.  If that doesn't work well for you you can always right-click on Annotations at the top of the tree and choose "Show Feature Dimensions", but that will display all the dimensions in the Part, not just the ones in the feature you need.

            • Re: Equations for dummies
              Tony Tieuli

              Josee Laplante wrote:

               

              Hi to all,

               

              Often I would like to insert equations in my models to make them more adaptive but equations and programming have never been my strength. Each time I do it takes forever of trial and error because I am utterly confused with all the different views in the dialog box and wonder under which to enter my equation. How do i know if I need to type " or ' ? How can I access all the sketch dimensions if I'm trying to create an equation in the first view? I browsed thru the Equation help but there is a lot of information and no examples.

               

              Does someone know of a blog, video or website to suggest that I could read or look at that would provide the basic guidelines with graphic help?

               

              T

              This video helped me.

               

              https://www.youtube.com/watch?v=r0lGDwCQKqU

              • Re: Equations for dummies
                Kevin Chandler

                Hello,

                 

                Perhaps you can post an example image of what you're trying to do.

                Or attach a sample part.

                 

                It would help narrow the scope of what you're after and the quantity and quality of the replies should improve.

                 

                Kevin

                • Re: Equations for dummies
                  Dennis Dohogne

                  Josee,

                  Some advice to make your life MUCH easier whether you use equations or Design Tables.  NAME any dimension or feature that you expect to use in the equations or Design Tables.  THIS ONE THING will make life so much easier.

                   

                  There is a very good tutorial for Design Tables under Basic Techniques and one for equations under Advanced Techniques (The tutorials are under Help in SWX).  Go through these tutorials carefully - several times if necessary.  They will dramatically shorten your learning curve and when you do have questions they will be based on a better foundation of knowledge.

                   

                  Personally, I prefer using Design Tables for the simple fact that Excel is incredibly rich with functions that are available to use.  I also like to color the cells and add instructions inside the Design Tables.  You can see an example in this thread:  Nice Trick for Design Tables to Show Driven Dimensions

                    • Re: Equations for dummies
                      Matt Peneguy

                      Dennis Dohogne wrote:

                       

                      Josee,

                      Some advice to make your life MUCH easier whether you use equations or Design Tables. NAME any dimension or feature that you expect to use in the equations or Design Tables. THIS ONE THING will make life so much easier.

                       

                       

                      Dennis has given you some excellent advice.  I like to start naming my dimensions with D1, then D2 and so on.

                      Kidding aside, choose something that makes sense...And I'll point out something that caught me.  Some names are reserved.  You cannot name a global variable "Thickness" and the error you get if you try to is very cryptic.  So, if you are using a name like that and you get an error, just spell it a little different.

                    • Re: Equations for dummies
                      Arthur McRae

                      I have a background in C++ so the logic has never really been a problem for me.  My problem has always been syntax.  First step in determine what you want the equation to do.  Then determine where you want it driven from, sketch or equations.  If you create global variables that are linked back to a sketch you can edit it directly from the sketch and change your part or assembly, if your Global variable is something you only have written in the Equations then you will have to enter the Equations again to alter anything.  I personally have a combination of both, having the variables that change in a sketch and having the fixed ones in the Equations so that they are harder to accidentally change.  Be careful about trying to scroll in the Equations window, very easy way to change your variables without realizing it.

                      • Re: Equations for dummies
                        Arthur McRae

                        equation clarification... maybe helpful.
                        if(  "argument" ,  "true value , "false value" )

                        ("argument-1" OR "argument-2" )  =  if either true, then true

                        ("argument-1" AND "argument-2") = if both are true, then true

                        I know this part many be counter-intuitive but think of this as if you are acting on the suppression  1= suppressed , 0 = unsuppressed  (you can also type suppressed or unsuppressed)

                        int( "x" ) rounds down to the nearest integer

                        round("x") classically rounds .5 to higher integer

                        • Re: Equations for dummies
                          Josee Laplante

                          Thank you all for your good ideas it is greatly appreciated. Next time I want to incorporate equations I will look into what you have suggested and showed me.

                            • Re: Equations for dummies
                              Glenn Schroeder

                              Josee Laplante wrote:

                               

                              Thank you all for your good ideas it is greatly appreciated. Next time I want to incorporate equations I will look into what you have suggested and showed me.

                               

                              I'm glad you found the suggestions helpful.  Please reply back and let us know how it goes (or if you have more questions then).