32 Replies Latest reply on Mar 15, 2017 10:55 AM by Rob Edwards

    Equation from assembly

    Victor Fagerlund

      Hi,

       

      I have several equations in an assembly, that defines the dimensions of two parts.

      This works fine.

      But when I open the parts, the equations have rebuild errors...

       

      Why ?

        • Re: Equation from assembly
          Rob Edwards

          I agree Victor, this is really daft/annoying.

          In order to have no errors the equations need be opened when the part is edited in context of the assembly

           

          part open/ assembly closed

           

          part open/assembly open

           

          part edited in assembly (no errors)

          I think I have read somewhere on the forum linking the global variables with an external file is a good idea.

          Im not sure but it removes the errors

          • Re: Equation from assembly
            Frank Ruepp

            Hi Victor,

             

            is it possible that the components are loaded in lightweight mode when the assembly gets opened?  In this case the assembly equations that refer to the parts would become dangling (lightweight mode = no features; no features = no dimensions; no dimensions = equation error since the equation assignments cannot be solved).

             

            Kind regards

            Frank

            SOLIDWORKS Product Definition Team

            • Re: Equation from assembly
              Vladimir Urazhdin

              Following Rob Edwards  advise, if it still not help, just recreate a broken link to Global Variable by click on it inside Equation Manager (internal link) or outside (external link), if parameter in equation linked to Global Variable outside part or subassembly.

              • Re: Equation from assembly
                Victor Fagerlund

                Hi Rob and Vladirmir,

                Thank you for your replies.

                 

                 

                Rob: An external file didn't solve the problem. I still get the rebuild errors. Maybe I did it wrong ? Do you want me to import the exported eqautions into each part ? It would be difficult doing it that way since some of the eqautions of the parts have it's own equations - for instance: "Bredde@Samlingstegning.Assembly"+ 100

                Equations.jpg

                 

                 

                 

                 

                Vladimir: I am not able to recreate the broken link, only thing I can do is to replace it with a new text ?

                • Re: Equation from assembly
                  Frank Ruepp

                  Hi Victor,

                   

                  I am still wondering if you open the assembly lightweight.  As I mentioned in my earlier post this could cause the trouble.

                   

                  Do you think that you could share the assembly with us (at least the portions with the equations)?  That way I could have a look at what could be causing the trouble.

                   

                  Kind regards

                  Frank

                  SOLIDWORKS Product Definition Team

                  • Re: Equation from assembly
                    Frank Ruepp

                    Hi Victor,

                     

                    when you hover over the warning/error you will see that SWX states that the equation is either defined out of context (it actually can only be solved when the part gets edited in the context of the assembly) when the assembly is open in the background:

                    Or that the equation cannot be solved at this point in time when the assembly is closed:

                    This is actually an external reference where the dimension is driven by another dimension defined in the context of an assembly.  It tells you that SWX cannot calculate the actual value without the assembly open.  So it is less like an error message but a message that points you to the actual problem.  If you have an ordinary external reference we also show you whether the component can be solved or not.

                    So the wording is perhaps a little harsh and could be more specific but at this point in time SWX cannot solve the equation what could be a potential problem.

                     

                    Thanks

                    Frank

                    SOLIDWORKS Product Definition Team

                      • Re: Equation from assembly
                        Rob Edwards

                        Hi Frank

                         

                        What I don't understand is why this is an error condition - with red font and pop up syntax error.  If we create sketch relations and view them out of context we get a friendly->?.  Why should working this way produce errors I would think the warning is appropriate. 

                        I often want to use an assembly global variable at part level, so I edit in context to create it.  When further developing the part I like to edit the part stand alone / not in the context of the assembly.  When working with equations the syntax error popup is really annoying.  I could have achieved the same thing the way John suggests with a sketch and there would be no error conditions.  Am I missing something in my workflow?

                          • Re: Equation from assembly
                            Frank Ruepp

                            Hi Rob,

                             

                            as I said the warning type is perhaps a little bit exaggerated.  But I guess from a solver point of view it is an error since the result cannot be calculated (and that is an error) and the response from the solver is likely "failed".  You will notice that the evaluated to field will remain empty since we cannot calculate a value since the input is missing.

                            To be honest, I am not sure if we can distinguish between "real" equation failure and "potential" equation failure.  As I said we likely get the "failed to solve" response from the solver and this response triggers the error message.

                            The sketch solver and the equation solver are two completely different things and therefore will probably have a different behavior in those cases.  Where we can have a "mild" out of context question mark and on the other hand we get an "aggressive" equation error.

                             

                            But I guess since the equation gets solved as soon as the assembly context is available it is likely not a "real error".  Since you know that this is not a real problem it is perhaps not so scary anymore...

                             

                            By the way, if you create the equation at the assembly level and not at the part level you will get a write protected dimension in the part and the actual equation is handled in the assembly:

                            When you edit the part you won't get the equation error since there is no equation at the part level.  You will only get a read only message when you try to edit the dimension that is driven by the assembly:

                             

                             

                            Kind regards

                            Frank

                            SOLIDWORKS Product Definition Team

                              • Re: Equation from assembly
                                Rob Edwards

                                Thankyou Frank, that look's a better way I guessed I was missing something

                                • Re: Equation from assembly
                                  Victor Fagerlund

                                  Hi Frank,

                                  I guess I am the one missing something now ? What did you do Frank ?

                                   

                                  I do all my equations inside the assembly at assembly level to define the width, lenght and height of all parts:

                                   

                                  Assembly.jpg

                                  I don't have any erros when I edit the part in context of the assembly.

                                   

                                  Part in context of assembly.jpg

                                   

                                  But when I later on work on each part alone or do drawings of them I get the errors. I know this is nothing serious - but it is very annoying. As Rob said, sketch relations shared between parts get a " -> " ... this is kind of the same thing you would expect equations to have when shared.

                                   

                                  Part alone.jpg

                                   

                                  Maybe I am missing something, if so, please elaborate.

                                  Thank you.

                                    • Re: Equation from assembly
                                      Vladimir Urazhdin

                                      "when I later on work on each part alone"

                                      Do not work on isolated part if part has an external links.

                                      Open assembly then part. Keep assembly open while work on the part(s).

                                        • Re: Equation from assembly
                                          Victor Fagerlund

                                          When I get the parts machined we work solely on part level.

                                            • Re: Equation from assembly
                                              Vladimir Urazhdin

                                              To work solely all external links must be replaced by numbers or internal links.

                                              • Re: Equation from assembly
                                                Jim Steinmeyer

                                                Victor,

                                                In following this thread in order to learn new trucks I have a question that relates to my reluctance to using top down modeling.

                                                     You said that the parts get machined at the part level but it seems that you allow the part to change dimensions depending on changes to the assembly. This creates a very scary situation to me where a part given  specific single part number can have different dimensions depending on how the assembly was last configured. A released part can change dimensions without and documented revisions. I have enough trouble with parts changing during design so released parts changing worries me no end.     When I do use top down I prefer to break all external links when the part is released but from your posts I gather that you are allowing changing assemblies to change the released parts. How do you deal with these undocumented changes for machining? I would like to learn to improve my procedure.

                                                  • Re: Equation from assembly
                                                    John Stoltzfus

                                                    Your reply sounds really scary to me.

                                                     

                                                    Two places where you can start at the top  #1. When you're digging a Hole # 2 Top down Modeling

                                                     

                                                    Jim Steinmeyer wrote:

                                                    When I do use top down I prefer to break all external links when the part is released but from your posts I gather that you are allowing changing assemblies to change the released parts. How do you deal with these undocumented changes for machining? I would like to learn to improve my procedure.

                                                     

                                                    See attached

                                                      • Re: Equation from assembly
                                                        Jim Steinmeyer

                                                        John,

                                                        Thank you for the document it will be a valuable resource as I attempt to implement top down more often. I especially appreciate the last point in your "Did you Know " section. To be honest, your practice is similar to how I have been doing top down only much more refined. With the exception that everywhere I have been we attempt to use parts and sub-assemblies in several different top level assemblies for commonality so it is much more beneficial for us to have separate drawings for parts and assemblies.

                                                             However this doesn't address (unless I missed it) my fundamental question/concern. If individual part dimensions are driven by top level SSPs or other assembly level equations, how do you ensure that all of the changes are captured for documentation when something top level is changed? I guess it may be answered in that you have all part drawings tied together in one drawing but where we have to export out DXFs out for each part to plasma I am concerned that a change will be missed in a plasma file. Especially when that part might be common to 14 different top level assemblies. That is why I break all external relations before releasing the final part design.

                                                          • Re: Equation from assembly
                                                            John Stoltzfus

                                                            In my workflow it is much easier then what you need to work with, because I also use a One Document drawing file with multiple tabs and not near the amount of interchangeable components.. There it would become a little more of a challenge if it's a manufactured component. 

                                                             

                                                            Buyouts such as hardware or drive train components would all be bottom up design.

                                                             

                                                            So to answer your question, when you edit the part you right click the sketch and select edit in context, then that will open the file it was designed in, make your updates there.  I will "Always" go to the source to keep my external references intact, if you delete or change the component, you could end up with a big mess.  Document control is critical and needs to be considered at every level. 

                                                             

                                                            Again keep the references and go to the source to change your values...

                                                        • Re: Equation from assembly
                                                          Victor Fagerlund

                                                          Hi Jim,

                                                           

                                                          I understand your concern, but I only think this would be a real concern in a multiple user environment.

                                                          I am the only one working in SolidWorks, and the shown assembly in the attached picture is a template I did to ease my own workflow. I do a lot of punching tools at the time, and all tools are the same. So within the template I can define the size of the punching tool and the thickness of each plate, so in this case I only use the equations once before I finish my construction.

                                                    • Re: Equation from assembly
                                                      Frank Ruepp

                                                      Hi Victor,

                                                       

                                                      you have created the equations inside of the part.  When I look at your screenshot I can see that you are currently in edit mode and you are editing the part "Bundplade":

                                                      So that means that you have created the equation at the part level but refer to the assembly with your equations.  In addition there is an equation folder at the part level with an external reference (Equations -> folder).

                                                       

                                                      What I did was to double click on the part in the assembly without editing the part in the assembly.  This will show me the dimensions of the double clicked feature:

                                                      Then I double clicked on the dimension in order to get to the edit dimension dialog:

                                                      Where I started an equation by typing the "=" sign:

                                                      Then I double clicked on the sketch that holds my dimensions that should be handed down and the selected the intended dimension:

                                                      Now when I hit ok, I will get an equation at the assembly level.  So the equation does not exist at the part level.  So when you edit the equations of the assembly you will see that there is an equation that drives the dimension of a part ("D2@Sketch1@PartEquation1<1>.Part"):

                                                      To be honest I do not know which way is the better way.  There are pros and cons for both approaches but I really do not know which way to go what is actually more beneficial.  With the equation at the part level you will figure out that there is something going on in relation to an external assembly.  If you create the equation at the assembly level you will get a write protected dimension what is perhaps not so obvious why it is write protected (perhaps just a mistake made by a colleague) and in the worst case you could remove the write protection and you could override the "frozen" value.

                                                       

                                                      Hope this helps

                                                      Kind regards

                                                      Frank

                                                      SOLIDWORKS Product Definition Team

                                                        • Re: Equation from assembly
                                                          Victor Fagerlund

                                                          Hi Frank,

                                                          Thank you for your feedback. This works perfect for me.

                                                          I can open the part without any errors now, and everything is still driven by the equations from the assembly.

                                                           

                                                          The write protection seems logic, if another person edit a part file with dimensions driven by the equations from an assembly - he will know not to touch those.

                                                          • Re: Equation from assembly
                                                            Rob Edwards

                                                            Hi Frank

                                                             

                                                            I've been exploring the method you suggest of adding component equations in the assembly to see if it works for my purpose.

                                                             

                                                            The first thing I noticed when opening the part on it's own outside of the assembly, is there is no indication that this has external references.

                                                             

                                                            The 'read-only' state is shown when you directly edit the dimension, but this doesn't apply in equations or to an instant 3d drag.

                                                             

                                                            SW quite happily allowed me configure this at part level, then when the assembly is opened Solidworks quietly overwrites everything with a single unconfigured dimension.

                                                             

                                                            For the use I have in mind I would like to have two configurations of my part, with a dimension equal to an assembly global variable A in config A and a different global variable in config B.  The assembly level component equations do not seem to take account of the configuration of the part at all.

                                                            When I added a global variable in my part and tried to drive the value from an assembly equation it caused Solidworks to crash

                                                             

                                                            Not withstanding the above caveats I do really like the behaviour and workflow in many regards and can forsee situations when it would be perfect.

                                                             

                                                            The solution I am currently considering is to create an assembly sketch with the diameter of a circle set to my 'global variable'

                                                             

                                                            Then in my part add a sketch with a coradial circle and use a 'driven dimension'.

                                                            I have to make sure that anything I want that has to use this value has a relation to this sketch so that it rebuilds when the 'global var' changes (a sketch point coincident with the circle center point) 

                                                             

                                                             

                                                            It's a faff, but it seems to be working.

                                                            I like that it is clear when the part is edited that an assembly is driving this, but there are no errors or warnings.

                                                            The part updates instantly (as long as care is taken with the driven dim, which is a downside)

                                                            I should be able to configure my assembly and configure my part.

                                                             

                                                            My question would be am I (again) missing something obvious and/or do you see any problems with this alternate workflow?

                                                             

                                                            Thanks

                                                  • Re: Equation from assembly
                                                    Frank Ruepp

                                                    Hi Rob,

                                                     

                                                    as long as it works for you it should be fine.  However, I personally don't like the use of a driven dimension as the driving source for other equations.  In the past you would have to do two manual rebuilds since the first rebuild would update the driven value and the second update would update the equations driven by the driven dimension.

                                                    So with all the work we did on equations over the recent releases we have taken care of this manual second rebuild and we should perform the second rebuild automatically.

                                                    But to be honest I cannot foresee if this automatic rebuild still works when the part is dug down in the hierarchy and it might not be obvious for SOLIDWORKS that we have to test against any potential circular references.

                                                     

                                                    So as I said.  As long as it works for you it should be fine but I personally would not go any further and nest this relation down in the assembly hierarchy.  I would keep it at the top level and would manually make a second rebuild.  Just in case...

                                                     

                                                    Kind regards

                                                    Frank

                                                    SOLIDWORKS Product Definition Team