10 Replies Latest reply on Aug 27, 2010 10:31 AM by Michael Maestas

    MMC LMC MACRO?

    Michael Maestas

      Hello All,

      I am looking for a macro to give the MMC and LMC of a model.  I have several models in which most have complicated and or several features.  All have been created at nominal.  I have a need to find the mass properties of these parts at their MMC and LMC conditions.  I found a promising link here but I cannot get the macro to work.  Can anyone get this macro to work?  Is there a macro that can perform this function?

       

      Advance thanks for the help.

      ...Michael

        • Re: MMC LMC MACRO?
          Josh Brady

          Can you specify why you can't get it to work?  What happens?

           

          My guess is that code is executing starting with the wrong subroutine.  When you run a VBA macro using Tools->Macro->Run, there is no way to specify which subroutine SW should start with.  This macro needs to start with the CreateMCconfigs() subroutine.  There are two ways to force this to happen.

           

          1. Open the macro in the VBA editor. 
          2. Click anywhere inside the CreateMCconfigs() subroutine to put the cursor there.
          3. Click the "play" looking button in the VBA editor's toolbar.

           

          The other way:

           

          Add a macro button to a toolbar.  As soon as you drop the user macro icon onto a toolbar, a dialog box will come up to specify the macro.  After you browse to the location of the .swp file, the dropdown for "Method" will be populated.  Choose "CreateMCconfigs".

            • Re: MMC LMC MACRO?
              Michael Maestas
              Can you specify why you can't get it to work?  What happens?

              I was able to force the subroutine, same error occurs.  It did however get the dialog box to work and prompt "Please be sure that your base configuration is active!!"

              No configurations were created nor did my part/model change to a MMC or LMC state.  This macro does not work as expected.  Can you get it to work for you?  I am not understanding the "runtime error '424'".  When I click debug, it prompts a highlighted line in the macro.  I dont know how to fix the problem.  I have no skills on editing a solution in VBA language, I'm a copy and paste kinda guy.  What is your perspective on the error?

               

              Much help needed,

              Thx...Michael

              MMC run config.bmpMMC run config error 424.bmpMMC error.bmp

                • Re: MMC LMC MACRO?
                  Josh Brady

                  Works fine on my machine.  Please try the attached macro.

                    • Re: MMC LMC MACRO?
                      Michael Maestas

                      I wish I could tell you that your macro worked.  I ran the macro and nothing happened.  (Tools>>Macro>>Run>>ToleranceAnalysis)  No configurations were added for MMC or LMC.  I'm trying it on a very simple part to test.  I meet all my preconditions:


                      1. A part model is open whose dimensions have tolerances
                      2. No configurations active named "MMC" or "LMC" (names changeable with string constants at top).  Macro will attempt to delete configurations with these names.
                      3. "Nominal" configuration is active.

                       

                      Yet nothing is happening.  How oh how did you get yours to work I have no clue (pulling my hair out)?  Here is my simple test part.  Is there something I'm missing?

                       

                      Fish outa water I'm just a flop,

                      ...Michael

                        • Re: MMC LMC MACRO?
                          Josh Brady

                          For the macro I attached, you will still have to force it to start with the correct procedure using one of the two methods I posted earlier.  Tools->Macro->Run will not work.

                            • Re: MMC LMC MACRO?
                              Michael Maestas

                              I really do appreciate you entertaining my ignorance.  I did try running the macro from “CreateMCconfigs” (see attached).  All I got the dialog box, “Please be sure that your base configuration is active!!” , I click OK and I get the error as stated above.  Nothing is working for me.  Is there a simple way to run the macro by using Tools>>Macro>>Run>>?

                               

                              Still running in circles,

                              …Michael

                               

                              P.S. Method one (steps 1,2,3) did not work for me I get the same error. Method two (the other way) works as far as the Dialog Box.