3 Replies Latest reply on Dec 18, 2014 3:00 PM by Mike Childers

    Macro to increment configuration number?

    Mike Childers

      How difficult would it be to create a macro that would auto increment configuration numbers?  I have a part that is a marker label.  It has 100 configurations.  Each configuration is named for the number on the marker.  I.e., when I want a 1 on the marker, that configuration is just called 1, 10 is called 10, etc.  It takes a long time to click on a marker and pull down configuration list for next marker number.  Would it be a difficult macro that would prompt for first marker number (also the name of the first configuration), and when I click on the first part it would change that parts configuration to that number, and then when I click on the next part, it would automatically switch it to the next highest configuration number?  That way I could increment, say, markers 1-10, quickly just by clicking each part in order, without having to pulldown config list for every part.  If that makes sense.  Thanks!

        • Re: Macro to increment configuration number?
          Daniel Andersson

          I would say not too hard.... but there is some user interactions that is needed. And to me, alot of coding and time... (please note that I'm just a mechanical engineer and not a application/software developer)


          I image a PropertyManager page where you select the referenced part to get all the configurations from.

          In the PropertyManagerPage you select where to start in a list of configurations (assuming that you do not always want to start at 1).


          Then you could use an event listner to listen for the selection of the next component.

          The listner would determine if the selected component is ok or not.. and then apply the next configuration if possible.

          You could also add stuff like "Hide all others components" etc to ease the selection if needed...

          This could also be further extended to have functions that jumps to the next component (marker) in the assembly tree as well.


          The PropertyManagerPage could be replaced by a UserForm in VBA to ease up the coding a bit... But a PropertyManagerPage gives a more professional look.

          I would also have thoughts about making this as a add-in instead of a macro of you plan to distribute it to a number of users.


          It would be fun to dig into this deeper than just having some brainstorming about it. Sometimes I dig into things like this and create the macro in order to learn more about the SW API and programming... but I have limited time and this would consume too much for me.


          I will gladly guide you as good as I can in the API reference and share thoughts about how things might be solved.

          Just let me know if you have any further questions.