Giter Club home page Giter Club logo

kiautotext's Introduction

KiAutotext

Script to place fields from title block and user fields onto PCB

Features

  • Easily place text on F_SilkS or F_Cu layers
  • User fields can be placed in a special UserTitleBlock component
  • Insert any field from the schematic title block, filename, today's date or user title block fields
  • Place text on any layer
  • Generate Code39 and Code128 barcodes from text fields

Customisation

  • text fields on the PCB can be moved to any position or layer, the text size changed, and the changes will be preserved.

Caveats

Placing text fields on copper layers is officially deprecated as it is not handled by the push and shove router or DRC. It is recommended to place keep out zones around text fields.

sample

Installation

  • copy the libraries to a suitable folder and add them to your project
  • copy the KiAutoText sub-folder containing the python files to a path accessible from KiCad e.g.
    • Windows: C:\Users\bob\AppData\Roaming\kicad\scripting\KiAutoText
    • Unix: ~/.kicad/scripting/KiAutoText

Running the script

  • NB always save any changed files in KiCad before running the script
  • In pcbnew, whenever you need to update the PCB fields, select Tools->External Plugins...->KiAutoText: Auto fill fields

Detailed Usage

Special component names

UserTitleBlock  User fields in UserTitleBlock are added to list of substitution 
                macros.

Special footprint names

text_F_SilkS    the Value field is placed on F_SilkS layer
                (similar to %F.SilkS:text)

text_F_Cu       the Value field is placed on F_Cu layer
                (similar to %F.Cu:text)

text_auto_date  the Value field is replaced with today's date and placed on
                F_SilkS.
                (similar to %F.SilkS:%DT)

text_auto       the Value field is used as a formatting string. Macro keys are
                substituted as follows.
                
                Standard keys:
                %F    the file base name
                %DT   today's date
                
                The following are read from the title block of the corresponding 
                schematic file:
                %T    Project title
                %R    Revision
                %D    Issue Date
                %Y    Company
                %C0   Comment 1
                %C1   Comment 2
                %C2   Comment 3
                %C3   Comment 4
                
                Additional substitutions are made according to user defined 
                fields from component "UserTitleBlock" if it exists.
                
                If the Value field has a prefix "%layer:", where layer is a layer
                name in the current PCB (e.g. "F.Cu") then the text will be placed
                on that layer.


auto_barcode39 
                The Value field is used to create a Code39 barcode. Invalid 
                characters are stripped out, and guard characters added to start
                and end.
                
auto_barcode128 
                The Value field is used to create a Code128 barcode.
                  

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.