• Skip to main content
  • Skip to search
  • Skip to footer
Cadence Home
  • This search text may be transcribed, used, stored, or accessed by our third-party service providers per our Cookie Policy and Privacy Policy.

  1. Community Forums
  2. Allegro X PCB Editor
  3. Default Active Class and Subclass for Add line command

Stats

  • Replies 2
  • Subscribers 160
  • Views 11605
  • Members are here 0
More Content

Default Active Class and Subclass for Add line command

Sulmaz
Sulmaz over 4 years ago

Hello,

is there a possibility to set default Active class and Subclass when I want to draw line either for design or Allegro generally?

When I am drawing a board I am using Class: Board geometry, Subclass: Assembly_notes for drawing lines in order to place precisely components, create center lines etc. But whenever I select Add line command, Class: Etch is usually selected (because I was routing some lines, I know). I am using this so often that I am losing a lot of time changing the classes.

I will be happy for any tip. Also I am using Allegro 16.6-2015 S060.

  • Cancel
  • Sign in to reply
Parents
  • excellon1
    excellon1 over 4 years ago

    Sure thing.

    There are a couple of ways to do this but one good way is by assigning a script to a hot key on your keyboard so every time you hit the key the subclass will auto change and the command invokes.

    Allegro is very powerful in regard to scripts, many things are possible.

    So to try something out first you need a script. Here it is.

    #START
    setwindow pcb
    trapsize 2410
    generaledit
    add line
    setwindow form.mini
    FORM mini class BOARD GEOMETRY
    FORM mini subclass ASSEMBLY_NOTES
    setwindow pcb
    #END

    Copy this to a text editor and save it to your c:\cadence folder as ADD-NOTES.SCR, ADD-NOTES.SCR will be the file name.

    In the script the command add line is invoked and next the class and subclass are invoked which you can see. In the pcb editor when you hit your hot key you will already have the command done and will be on the layer you need so all you got to do is left click the mouse and draw your line.

    Lastly you need to assign a hotkey and this is done by adding info to your .env file. Normally this file is located under c"\SPB_Data > pcbenv folder. go into that folder and you should see a file called env. Open the file with a text editor.

    So there a couple of options for the hot key you wish to use. In general it should not be used elsewhere. For simplicity lets use the hot key number 1.

    here is the command to add to that .env file.

    funckey 1 replay ADD-NOTES

    Just add the command under the line source $TELENV
    #####
    #####
    funckey 1 replay ADD-NOTES

    It should look similar to the above.

    Save the .env file. Note that .env file has no extension.

    Start allegro to load the new .env file.

    Hit the 1 key and you should be good to go.

    Let us know if it works out for you or if you run into any issues.

    All the best.

    • Cancel
    • Vote Up +1 Vote Down
    • Sign in to reply
    • Cancel
  • Sulmaz
    Sulmaz over 4 years ago in reply to excellon1

    Thank you so much! This really helped me a LOT!

    • Cancel
    • Vote Up 0 Vote Down
    • Sign in to reply
    • Cancel
Reply
  • Sulmaz
    Sulmaz over 4 years ago in reply to excellon1

    Thank you so much! This really helped me a LOT!

    • Cancel
    • Vote Up 0 Vote Down
    • Sign in to reply
    • Cancel
Children
No Data
Cadence Guidelines

Community Guidelines

The Cadence Design Communities support Cadence users and technologists interacting to exchange ideas, news, technical information, and best practices to solve problems and get the most from Cadence technology. The community is open to everyone, and to provide the most value, we require participants to follow our Community Guidelines that facilitate a quality exchange of ideas and information. By accessing, contributing, using or downloading any materials from the site, you agree to be bound by the full Community Guidelines.

© 2025 Cadence Design Systems, Inc. All Rights Reserved.

  • Terms of Use
  • Privacy
  • Cookie Policy
  • US Trademarks
  • Do Not Sell or Share My Personal Information