65 Replies Latest reply on Jul 14, 2017 8:44 AM by Saurabh Jagirdar

    model parameters

    Thaddeus Hosford

      Is there a list of model parameters like what inventor has?

      It allows you to change any value that was used to make the model.

      See attached image

        • Re: model parameters
          Steve Ostrovsky
          You can do this via Equations (Tools > Equations) or Design Tables (Insert > Tables > Design Table). Too much to list in a forum update, but do a search for that here or run through the Design Table tutorial in the Help menu. The equations will probably work closest, though.
            • Re: model parameters
              Thaddeus Hosford

              Steve

              I understand the ability to see equations, but what about all dimensional values that define the model?

              Thanks

              Thaddeus

                • Re: model parameters
                  Steve Ostrovsky
                  Design Tables shoudl work best. Built in Excel spreadsheets that allow you to use all the power of Excel to drive the SolidWorks dimensions and properties. I've seen some amazing configurators built around this to drive part and assembly control/generation.
                    • Re: model parameters
                      Thaddeus Hosford

                      Steve

                       

                      I think you are missing the point.

                      I do not want to make a design table for every part.

                      All I am asking is there a way to view all equations as well as all dimensional data that was used to make the model or not?

                       

                      Think about reviewing a model someone else has designed, instead of opening all sketches and reviewing the dimensions, this would allow you to see the dimensions on one page without previously making either a equation for each value or making a design table.

                       

                      Thanks

                      Thaddeus

                • Re: model parameters
                  Charles Culp

                  I do not know of any method to show all the parameters at once. There are multiple ways to modify multiple parameters, but they all involve selecting those parameters first. For whatever reason, this information is available, but not accessible in an easy fashion. You can right click on the part name at the top of the feature tree, and you will see an option for "Dimension Access". This is a lesser-known function inside solidworks to "lock out" certain dimensions, so they cannot be edited. It will list the name of every dimension in the part, but not the values for each.

                   

                  If you double-click on features or sketches, you can then select all of them, and choose "configure dimension". This allows you to edit sets of data (thoughout all the configurations) easily. However I agree this is now what you asked.

                   

                  As this dataset is available somehow (as shown by dimension access function), I have to wonder if someone wrote a macro for this? Hopefully some people more familiar with all the macros out there can comment.

                  • Re: model parameters
                    Kelvin Lamport

                    There is no built-in function in SW for that, but Josh Brady (of these forums) came close with a EditMultipleDimensions macro in https://forum.solidworks.com/message/87807#87807

                    • Re: model parameters
                      Josh Brady

                      It may be a bit crude, but check this macro.

                       

                      When you run the macro, a table will load of all model dimensions.

                       

                      The form is non-modal, which means that you can still interact with the model while the form is visible.

                       

                      Any rebuild of the model will refresh the form.

                       

                      You can change the dimension values directly on the form, then hit the button to apply your changes to the model.

                       

                      If you switch documents, the form will refresh to the new document.  Any unapplied changes to the form will be lost, however.

                       

                      Clicking on any entry in the table will highlight its feature and select the dimension.

                       

                      For models with multiple configurations, dimension changes should apply using the current setting of that dimension, just like you edited the dimension in the user interface without specifying how the change should affect configs.

                        • Re: model parameters
                          Thaddeus Hosford

                          Josh

                           

                          You’re awesome.

                           

                          I think what you have here is gold plated.

                           

                          Thanks, I’m sure others will like this Macro.

                           

                          Thaddeus

                          • Re: model parameters
                            Mark Greenwell

                            Josh,

                             

                            That is one nice macro, I hope Solidworks see it and pay you lots of money to add it to the core product.

                             

                            Thanks

                             

                            Mark

                              • Re: model parameters
                                Josh Brady

                                Here's a slightly updated version.

                                 

                                Ignores Cosmetic Threads by default (Hole Wizard with Cosmetic Thread creates a bunch of useless entries in the list)

                                 

                                Ignores driven dimensions by default

                                 

                                For dimensions driven by an equation, displays the equation

                                 

                                For linked values, displays link name.  Editing one entry that is linked changes all same linked entries.

                              • Re: model parameters
                                Charles Culp

                                Josh,

                                 

                                Your program is outstanding.

                                 

                                Would it be easy to make it work for drawings? Pull all the dimensions and tolerances on a drawing? There is some pretty expensive 3rd party software out there that does that for first article inspections. It pulls the dimensions, and puts bubbles on the drawings.

                                 

                                If you could port this over to drawings you could even charge some money and I know of at least one company that would be thrilled to purchase it from you. The only catch there is we would want bug support and support for future versions!

                                  • Re: model parameters
                                    Deepak Gupta
                                    Josh you are on demand....
                                    • Re: model parameters
                                      Josh Brady

                                      Charles,

                                       

                                      Have you seen this macro before?  Does it come close to your need?

                                        • Re: model parameters
                                          Charles Culp
                                          Very nice. Not as clean as the programs we were looking at, but the price is right.  Thanks Josh. Did you make that one? There was no credit block that I could find.
                                            • Re: model parameters
                                              Josh Brady
                                              Yes, I wrote that one some time ago.  It's certainly a bit crude.  Its biggest weakness (I think) in its current form is that it doesn't "remember" which flags go with which dimensions from run to run.  If you run the macro, then go mess around with dimensions (adding/deleting), then run again, the flags will likely change.
                                                • Re: model parameters
                                                  Paul Marsman

                                                  Josh,

                                                    We actually have a program that does this for us too.  It reads dimension values, GDT, Surface finish, notes etc. and remembers the data from session to session by exporting to an xml file that gets stored with the model and exports the list of values to a txt file.  Not sure if maybe you would want to add something like that for your program.  It also saves the balloon locations relative to the annotation so when you insert them or move annotations the balloons stay in the same spot relatively. FWIW

                                                   

                                                  What is interesting is that I ran across this thread while trying to figure out how to get my menu back to launch my exe for this program from SW... shouldn't have started messing around so much when I don't know enough to not be dangerous

                                              • Re: model parameters

                                                Hi.  This file is really good.  However I have to reopen it everytime I make some changes on the model.  Is there any links between the excel and 3D model, so I have both update everytime I change dimensions on the model.  Thanks

                                                Kelvin

                                                  • Re: model parameters
                                                    Josh Brady
                                                    I'm not sure if you're talking about the macro that is the main subject of this thread, or the one that works with drawings that I posted for Charles.  Sorry, there's no link between Excel and the model in either one.  If you are talking about the one with the form, the form values will update with every model change.  You do not have to close the form to continue working with the model.  You can even switch between documents with the form still open.  However, the function for exporting to Excel is only one-way, and it only happens when you hit the button.
                                                  • Re: model parameters

                                                    Hi Josh.  Thanks for your information.  One more question I want to ask you.  After I run the Flag file and import it to an excel sheet, I had some unexpected decimal places which are not on my drawing.  I will attach a excel sheet for you to look at (I already red line those dims with long decimal places).  Thanks

                                                    Kelvin

                                                      • Re: model parameters
                                                        Josh Brady

                                                        This is because the macro exports the dimension value, not the dimension text.

                                                         

                                                        If you do not want to round the values in the Excel sheet, you can add code to read the precision of the display dimension and round the value before putting it in Excel.

                                                          • Re: model parameters
                                                            Claudio Ventura

                                                            Hallo Josch,

                                                            many thanks for your macro TabulateAllDimsWithCriticals.

                                                             

                                                            I Woul like to have a form to manage dimension of my multibody part.

                                                             

                                                            Thinking on your macro,

                                                            I would like to select dimensions and functions, chose or create a  form or a group , chose an object type (flag, text, combo...)

                                                             

                                                            Do you know if it alredy exist ?

                                                            Many thanks

                                                            Claudio

                                                              • Re: model parameters
                                                                Josh Brady

                                                                Sorry, but I couldn't really make out exactly what you are looking for.  Also, I just don't have time to mess with that right now.  Any takers?

                                                                  • Re: model parameters
                                                                    Jaipal Nalla

                                                                    Hi Josh,

                                                                     

                                                                    Your macro is very useful. I am new to Solid Works API and I had exactly same question what Thaddeus has and after reading through this forum and test your macro it answered most of my questions.

                                                                     

                                                                    But I still some more doubts, can you please suggest.

                                                                     

                                                                    1) There are some parameters in "Evaluate tab->Design Study-> Parameters" section. May I know by any chance these parameters can be referenced in feature dimensions for example extrude length of Boss etc..?

                                                                    2) Is it possible create a user defined dimensions first and then use those dimensions while creating sketch or extrude feature

                                                                    3) Is it possible to reference part level dimensions/parameters at assembly level?

                                                                    4) Is it possible to have dimensions/parameters at instance level.

                                                                    5) Is it possible to use ModelDoc2.Extension.SelectByID2() method to get all dimensions instead of traversing through one by one feature to get all dimensions?

                                                                     

                                                                    Excuse me if these questions are very basic.

                                                            • Re: model parameters
                                                              Philip Albert

                                                              As Charles said, thank you for all of this, it's already helped quite a bit.

                                                              Would it be hard to take that ballooning and everything and add the Zones they can be found in as well?

                                                        • Re: model parameters
                                                          Manas Srivastava

                                                          i am using solidworks 2014 and when i run the api it says you are missing some credentials .how do i make it run in solidworks 2014.