2 Replies Latest reply on Feb 17, 2017 12:38 AM by stanleycayochok

    Srcript to check pad to pad distance at library and make a report




      Im new to mentor scripting and would like to use this also to start and learn to make my own script. I need to make a script to check all the cells at library that has a pad to clearance that is below 0.25mm, afterwards it will create a report within it the cells that pass this criteria.

        • 1. Re: Srcript to check pad to pad distance at library and make a report

          Hi Stanley, and welcome.


          Do you have any other scripting experience?  It would be helpful to know if we are starting from ground zero or a few floors up.  No worries either way, we all start somewhere.


          With Mentor there are basically 3 ways to do it:

          • vbscript
          • EFM
          • .net languages

          There are actually some other languages you can use, but these three are the mainstream. 


          vbscript: These are simply text files with .vbs extension, written in the visual basic language.  Mentor has a built in script engine which knows how to establish communication with the running Mentor tool process and then receive requests and commands from the script during execution. There are examples of this kind of scripts in the Mentor installation tree under \SDD_HOME\standard\examples\pcb\Automation\Scripts


          EFM: I'm still not sure what EFM stands for, but it's a simple integrated design environment (IDE) which combines vbscipt with a graphical user interface (GUI) so that you can attach scripts to objects in a window.  There is a big set of scripts which work with the Mentor tools called the AutoActive Tool Kit (AATK).  It is available for free, and is a great resource.  You can use the AATK tools as they are, modify them to suit your needs, or create your own. The AATK is available here.


          .net: (my favorite way) - You can get free compilers for any of the .net languages.  I use vb.net and C#.net. Compilers are available from SharpDevelop and Visual Studio Express.  The benefits of the .net world are:

          • There are a lot more internal functions and objects already built in
          • Some of the built-in features enable much faster program execution and less design effort to implement
          • There are interfaces available to many other software tools - I have interfaces to all the MS Office products, Adobe Acrobat, SolidWorks, and SQLite.  I suppose some of these are also available with the simpler scripting languages but they would be much harder to use.

          I have made an automation template for vb.net with the startup routines for all the Mentor PCB design tools.  It's available here.  You are free to use that any way you'd like. You'll need to change the filename to add the .7z extension, then use 7-zip to unzip it. It works with the XpeditionVX.1.2 flow.


          Specific to your question about working on cells in the library, check out this thread and this one.

          • 2. Re: Srcript to check pad to pad distance at library and make a report

            Hi Patrick,


            Thanks for providing a detailed response.


            I don't have any scripting experience.


            I have installed a Visual studio 2015 was able to open your template. Any tips on what to learn first. I don't have any background on using the visual studio.