• 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. how can you get the current grid settings

Stats

  • Replies 7
  • Subscribers 160
  • Views 16042
  • Members are here 0
More Content

how can you get the current grid settings

Ejlersen
Ejlersen over 15 years ago

Hi

Is there a way to get the current grid settings? I've looked over the documentation without finding anything, so hopefully someone here knows how to?

Best regards

Ole

  • Sign in to reply
  • Cancel
Parents
  • EvanShultz
    EvanShultz over 14 years ago

     Ole, I'm not trying to hijack your thread but I found something I think is interesting using these new axlDBGrid* functions.

    My co-workers and I want the ability to pick various pre-defined grids from keyboard commands and also from the menu. Previously, to change the grid size I'd used either scripts or a series of commands directly in site.env or allegro.men. However, it occurred to me that either method was equivalent to typing into the Command Window, which I might be able to use to launch a SKILL function with axlCmdRegister().

    So, I changed (just a single line as an example below) my site-wide allegro.men to:

    MENUITEM "0.5 unit",        "qscGridSet .5"

     and site.env to:

    alias    ~1    "qscGridSet 1"

    which calls:

    axlCmdRegister("qscGridSet" 'qscGridSet)

    procedure(qscGridSet(gridNew)
        let((grid)
            grid = axlDBGridGet("TOP")
            grid->name = 'all
            grid->xGrids = atof(gridNew)
            grid->yGrids = atof(gridNew)
            axlDBGridSet(grid)
        )
    )

    It works!! So I am able to launch a SKILL function and pass it an argument. The argument comes in as a string, so I have to make it a float (even integers aren't accepted). This is much less distracting (no forms flashing open) and quicker to run than a script. Win-win!

    I am also using a similar method to execute my own SKILL function which adjusts layer visibility to have easily-accessed Layer Sets.

     

    Is there anything wrong with this method? It seems a little, well, like I'm breaking the way things are supposed to work. Is there danger in counting on this method to always work in future releases (of course there's always the possibility of anything breaking)?

     

    BTW, it seems odd that I just have to pick any layer as an argument to axlDBGetGrid() if I want to adjust the grids for all layers. If I have each layer defined, and also a "non-etch" argument, why not an "etch" and/or "all" argument? It seems far more intuitive. I suppose this might be a fxffxf question??

    • Cancel
    • Vote Up 0 Vote Down
    • Sign in to reply
    • Cancel
Reply
  • EvanShultz
    EvanShultz over 14 years ago

     Ole, I'm not trying to hijack your thread but I found something I think is interesting using these new axlDBGrid* functions.

    My co-workers and I want the ability to pick various pre-defined grids from keyboard commands and also from the menu. Previously, to change the grid size I'd used either scripts or a series of commands directly in site.env or allegro.men. However, it occurred to me that either method was equivalent to typing into the Command Window, which I might be able to use to launch a SKILL function with axlCmdRegister().

    So, I changed (just a single line as an example below) my site-wide allegro.men to:

    MENUITEM "0.5 unit",        "qscGridSet .5"

     and site.env to:

    alias    ~1    "qscGridSet 1"

    which calls:

    axlCmdRegister("qscGridSet" 'qscGridSet)

    procedure(qscGridSet(gridNew)
        let((grid)
            grid = axlDBGridGet("TOP")
            grid->name = 'all
            grid->xGrids = atof(gridNew)
            grid->yGrids = atof(gridNew)
            axlDBGridSet(grid)
        )
    )

    It works!! So I am able to launch a SKILL function and pass it an argument. The argument comes in as a string, so I have to make it a float (even integers aren't accepted). This is much less distracting (no forms flashing open) and quicker to run than a script. Win-win!

    I am also using a similar method to execute my own SKILL function which adjusts layer visibility to have easily-accessed Layer Sets.

     

    Is there anything wrong with this method? It seems a little, well, like I'm breaking the way things are supposed to work. Is there danger in counting on this method to always work in future releases (of course there's always the possibility of anything breaking)?

     

    BTW, it seems odd that I just have to pick any layer as an argument to axlDBGetGrid() if I want to adjust the grids for all layers. If I have each layer defined, and also a "non-etch" argument, why not an "etch" and/or "all" argument? It seems far more intuitive. I suppose this might be a fxffxf question??

    • 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