0 Replies Latest reply on Apr 29, 2015 2:45 PM by David Hinners

    Have you ever tried to write a macro for a description builder?

    David Hinners

      I am currently learning to write macros using resources such as these forums, the API help files, and the internet in general.  I feel I have made good progress, but writing a good macro is not just about the proper code to make it run without errors - you need the proper logic so you accomplish what you need to.  I am working on a macro to generate a description for our part naming convention via "wizard" to match a standard Noun, Adjective, Adjective... format.  Ideally it would eliminate spelling errors, improve consistency, and make it easier to find a similar part in the future.  I have a macro so far that can read and write properties to parts and assemblies, including for configuration-specific properties.  My plan is to have a separate form for the description and generate it term by term from lists of accepted terms.  I also plan to use the API CheckSpelling method along with a custom dictionary populated with my own special terms to try to catch problems with entries that are not included in my lists.

       

      My question is: What sort of strategy would you use to accomplish this?  I recognize that the available terms that I use for building a description will necessarily be lists specific to my particular company and there will be a fair amount of work involved to generate them.  Once I have them, though, I am not sure of my best path forward.  I guess a secondary question would be:  Is this is a hopeless pursuit not worth the effort? Or maybe a better question would be: Has it been done before?