10 Replies Latest reply on Nov 2, 2018 11:54 AM by Matt Juric

    Show Action on screen?

    Matt Juric

      So I know next to nothing about macros.

       

      I'm attempting to do a macro that does a bunch of things and track the time of how long it takes to do those things. I started a macro, did a bunch of things and saved the macro. I added some lines I found to record time and report it.

       

      I run the macro and it appears to run. First action is to open an assembly, it does that. However once it opens up it does not show the rest of the actions on the screen. I'd believe that I need those things to be shown on screen in order to get the real time that I'm looking for.

       

      It appears to run thru the entire macro and successfully reports the time it takes to do it...which I know to be significantly slower than what it takes to do when it's shown on the screen.

       

      My questions would be.

       

      1) Is there a way to show this stuff on the screen

      2) Is it possible that despite showing up in the macro that the actions I took are not actually happening for some reason?

       

      Thanks,

        • Re: Show Action on screen?
          Josh Brady

          Based on the fact that you recorded the macro, my confidence that the macro is not doing everything is nearly indistinguishable from 100%.  Can you post the code?

            • Re: Show Action on screen?
              Matt Juric

              Here's the entire Macro. Thanks for taking a look.

                • Re: Show Action on screen?
                  Josh Brady

                  Delete the "CloseDoc" statement at the end.  Compare the state of the model after running to your expectation of what should have happened during the macro.

                    • Re: Show Action on screen?
                      Matt Juric

                      It does not look like it did anything. That being said I'm not 100% sure of that because part of what I did was to delete everything I did. I *Thought* I had moved some parts, dragging them, and the appear to be in the exact same spot.

                       

                      I think I will create another one and make a couple changes and leave it and see if it does it during the macro.

                       

                      Thanks

                      • Re: Show Action on screen?
                        Matt Juric

                        The one I just did appears to have done what I asked it to. I will mess around with it some more and see if it just stops doing things at some point or only does certain things.

                         

                        Thanks,

                        • Re: Show Action on screen?
                          Matt Juric

                          Well turns out that some things work and some things don't.

                           

                          Something like doing an array seems to work. Things like rotations and manipulations seem to work. None of these things actually show up while taking place. The "On screen" view shows what it looks like when you open the drawing and what it looks like when you're done and shows none of the interim movements or operations.

                           

                          Copy/Past,[CTRL-C],[CTRL-V] does not seem to work, but holding [CTRL] and dragging the part into the assembly does seem to work. Adding appearances to faces don't show up in the macro at all.

                           

                          I've done several tests and it would appear that something "Breaks" part way thru for some reason. Other than the above things that don't seem to work it works as I would expect. Shows rolls, copies, mates etc. However everyone I've done just stops working part way thru. For instance in the attached it completes this portion of the macro, dragging in and doing the first mate of the second part, but it does not do the second picture. The last two mates of the same part. The only thing between the two is a roll view. The second attached macro I deleted everything between the mates and it still doesn't work. The third to last mate works and the last two do not.

                           

                          Clearly something is breaking but I have no idea what.

                           

                          Thanks

                    • Re: Show Action on screen?
                      Nadia Shea

                      Are you trying to track time of a bunch of things as basically a benchmark test? Are you intending to run this macro on multiple machines as a comparison?

                       

                      If so, SolidWorks already provides a pretty comprehensive benchmark test already (including graphic performance). You can find it in the Solidworks RX utility (Already installed and available on any machine running Solidworks). It also allows you to compare results with other users who allow sharing their results, giving you a wider pool to compare against.

                        • Re: Show Action on screen?
                          Matt Juric

                          As mentioned above, if I understand correctly, the Rx Benchmark is basiclly a hardware test. Not much different then any other PC benchmark test that tests hardware. I'm more interested in how various settings in and out of solid works effects performance. The Benchmark supplies might, again if I understand correctly, cover Windows setting changes but probably not Solidworks setting changes and definitely not changes in our models.

                           

                          A big goal for me will be to see what changes we can make in our models to lower load time, memory usage, calculation/rebuild, etc etc.

                           

                          For instance I did a performance analysis and found that some of the toolbox models had their shaded and draft quality set to almost the highest setting. When you have 1000 screws that are set like that I would assume it has a massive effect on performance.

                           

                          I want to test the effect so I can go to everyone and say "This is what we need to do, this is why, and this is what gains we can expect when we do"

                           

                          Thanks,

                            • Re: Show Action on screen?
                              Nadia Shea

                              Fair enought... GREAT end goal. I bet alot of ppl can chime in with various setting to turn on/off with various geometry or situations.

                               

                              If you can find a copy, SW used to publish a great book called ‘Improving Large Assembly Performance’. They quit physically printing it a few years ago but there might be an ecopy floating around. A ton of great info there, including system options and documeny properties.

                               

                              The most common culprits I have seen  in support:

                              >Image quality set too high in document properties.  Sounds like you got it.

                              >System options: enable advanced body checking. (Slows down rebuild)

                              >Any feature level pattern - toggle ‘geometry pattern’ option and compare rebuild times. Sometimes it‘s faster off and sometimes faster on. If both give you the desired resulting geometry; pick which is faster.

                               

                              Sorry, my unasked for 2 cents.., and I’m no help at all with code. >.<

                                • Re: Show Action on screen?
                                  Matt Juric

                                  I found an old article that had a complete performance test run by CATI. It had a ton of recommendations on everything from OS settings, SW settings and model settings. I plan on following that basic approach and test their recommended settings. So far I think I have seen.

                                   

                                  1) Old versions. We have several product lines where we copy various existing assemblies and reuse them. People are not "Resaving" in current versions and I think that is killing us.

                                  2) Graphic settings set way to high.

                                  3) Solid works set to default settings which according to the CATI test is not the way to go

                                  4) limited paging space and other windows settings. (granted not paging is ideal but when you have 2-3 massive assys open and your paging space is set way low you basically stop)

                                  5) Imported models with unnecessary details, face appearances, actual threads on fasteners, high graphics settings

                                   

                                  In short with a few quick test I found a bunch of problems. My hope is to run these tests and come up with an "Optimized" SW and System setting and then a "Best practice" for models and modeling as applied to our models and usage.