Free Trials

Download a free trial to find out which Altium software best suits your needs

How to Buy

Contact your local sales office to get started on improving your design environment


Download the latest in PCB design and EDA software

  • Altium Designer

    Complete Environment for Schematic + Layout

  • CircuitStudio

    Entry Level, Professional PCB Design Tool

  • CircuitMaker

    Community Based PCB Design Tool


    Agile PCB Design For Teams

  • Altium 365

    Connecting PCB Design to the Manufacturing Floor

  • Altium Concord Pro

    Complete Solution for Library Management

  • Octopart

    Extensive, Easy-to-Use Component Database

  • PDN Analyzer

    Natural and Effortless Power Distribution Network Analysis

  • See All Extensions

    World-Renowned Technology for Embedded Systems Development

  • Live Courses

    Learn best practices with instructional training available worldwide

  • On-Demand Courses

    Gain comprehensive knowledge without leaving your home or office

  • Altium 365 Viewer

    View & Share electronic designs in your browser

  • Altium Designer 20

    The most powerful, modern and easy-to-use PCB design tool for professional use


    Annual PCB Design Summit

    • Forum

      Where Altium users and enthusiasts can interact with each other

    • Blog

      Our blog about things that interest us and hopefully you too

    • Ideas

      Submit ideas and vote for new features you want in Altium tools

    • Bug Crunch

      Help make the software better by submitting bugs and voting on what's important

    • Wall

      A stream of events on AltiumLive you follow by participating in or subscribing to

    • Beta Program

      Information about participating in our Beta program and getting early access to Altium tools

    All Resources

    Explore the latest content from blog posts to social media and technical white papers gathered together for your convenience


    Take a look at what download options are available to best suit your needs

    How to Buy

    Contact your local sales office to get started improving your design environment

    • Documentation

      The documentation area is where you can find extensive, versioned information about our software online, for free.

    • Training & Events

      View the schedule and register for training events all around the world and online

    • Design Content

      Browse our vast library of free design content including components, templates and reference designs

    • Webinars

      Attend a live webinar online or get instant access to our on demand series of webinars

    • Support

      Get your questions answered with our variety of direct support and self-service options

    • Technical Papers

      Stay up to date with the latest technology and industry trends with our complete collection of technical white papers.

    • Video Library

      Quick and to-the-point video tutorials to get you started with Altium Designer

    Advanced Design Techniques with Altium Designer

    June 17, 2019

    In this article, we’ll learn how to use Altium Designer® to implement extra functionalities that are not available by default. We’ll discover a powerful aspect of Altium Designer that when mastered can bring your design skills to a higher level. In this article, we’ll discuss how to implement a script to perform design verification for you.

    We will learn:

    • How to create rules to verify some design requirements.
    • To verify those rules using a script in Altium Designer 19.

    A Typical Problem

    These days, designs are very complex. In general, customers have expectations of their PCB designers that their boards will work the first time. For this to be achieved, attention to detail is critical.

    In this example let’s see how to create a script that can be used in a real-life design. Consider the following design problem:

    We need to design a high-resolution ADC board using a 16 bits ADC converter. The ADC converter has an input impedance of 1 kΩ. “What is the maximum trace impedance between driver and ADC to achieve an error below 1 LSB?“ “Can we design a Script that can help us?”

    Figure 1 design a trace of a High-resolution ADC

    To answer this question, we need to calculate the trace’s resistivity and check if the voltage drop on the trace is higher than 1 LSB.

    To calculate the trace resistivity, we can use the following formula:


    For example:

    Let’s assume our trace has the following dimension: L = 10 cm, h =  0.035mm , w = 0.381mm. Using the [1], and assuming the ambient temperature is 25 °C the DC trace impedance is 129 mΩ, this will produce a voltage error of 0.013% ., well above 1 LSB (0.0015%)  of a 16 bit ADC. So, the above track will give us an offset error of almost 9 LSB!

    Is it possible to ask Altium Designer to do all the above check for us? Possibly in real-time?

    The answer is obviously yes.

    Let’s design a script that gives us this information.

    We want to be able to click on a trace, and we want Altium Designer to do some checks for us like calculating the trace resistance, calculating the voltage drop, etc.

    Figure 2 example of information from our demo script

    How To Design A Script In Altium Designer

    Altium Designer accepts script in a few languages, during my career I have used many languages, but one of the first languages I used in my professional life was Delphi, therefore I decided to write this script in Pascal. However, you can use other scripting languages like Visual Basic if you prefer.

    Let’s see how to design a script in Altium Designer that solves the above problem.

    In our script we want to:

    1. Load our PCB Board
    2. Load all the Layers Stack (to get information like trace width, height, etc.)
    3. Load the trace that the user has selected with the mouse
    4. Calculate the resistance using the formula [1]
    5. Display the trace error and the ADC error

    How to Implement A Script In Altium Designer


    The first instruction we want to execute is to load our PCB design and save it in a variable called Board. We can do this with the following instruction:



    Once the Board is loaded, we want to load the Layer Stack and save into a variable called Stackup:



    We can now use the method GetObjectAtCursor () to get the trace selected and save into a variable called Trace.



    Once the user selects a trace with the mouse, we want to calculate the trace width, length, and height, and save them in 3 variables  called TraceThickness, TraceWidth and TraceLength:




    We can finally calculate the trace resistor Res using the [1], calculate the voltage drop (assuming the ADC has a Vref of 1V).



    Once all the calculations are done we can display on the screen. An easy way to do this is by using the MessageDlg() windows.

    OutputString := 'Trace thickness = ' + FloatToStrF(TraceThickness,0,5,4) + ' mm' + #13#10 ;
    OutputString := OutputString + 'Trace Width = ' +   FloatToStrF( TraceWidth,0,5,4) + ' mm' + #13#10;
    OutputString  := OutputString + 'Trace Length = ' + FloatToStrF(TraceLength,0,5,4) + ' mm' + #13#10#13#10#13#10;
    OutputSTring :=  OutputString + 'Trace Resistor = ' +  FloatToStrF(Res ,0,5,4) + ' mohm' + #13#10;
    OutputSTring :=  OutputString + 'Trace Voltage drop  = ' + FloatToStrF(VoltageDrop ,0,2,2) + ' %'  + #13#10;
    OutputSTring :=  OutputString + 'ADC LSB = ' +  FloatToStrF(ADCLSB ,0,2,2) + ' %'  ;
          MessageDlg(OutputString,mtInformation ,4,0);


    How To Run The Script

    To test the script, from your PCB Document click on File->RunScript…

    Then select your script:

    You should see now a large cross:

    Click on the trace you want to analyze.

    Now you should see the message windows with the calculations:

    It is possible to extend this script and add a more sophisticated check, for example, to extend the tracks to arch and add the effect of temperature, etc. I will leave this to you as an exercise.

    What Have We Learned?

    We have seen that Altium Designer, once mastered, can be used to perform complex actions for us. In this example, we have seen how it is possible to measure the DC trace impedance with just a click and how to estimate the voltage error in a High-resolution ADC design.

    This demo script has a lot of limitations but can be used as a base for your own Altium Designer extensions.

    Have more questions? Call an expert at Altium or discover more about the best PCB design software features and trace impedance calculator in Altium Designer.

    most recent articles

    Back to Home