• 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 159
  • Views 16029
  • 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
  • fxffxf
    fxffxf over 15 years ago

     you can try a recent 16.3 isr and use the axlDBGridGet

     

      NAME
    axlDBGridGet - get grid values
    SYNOPSIS
    axlDBGridGet(
    nil
    ) ==> lt_grids

    axlDBGridGet(
    t_gridName
    ) ==> og_grid
    FUNCTION
    Returns current grid values. Function has two modes:
    - if gridname is nil returns list of names
    - If given a grid name return its grid characturistics (see below)

    Reserved grid name is "non-etch" otherwise grid names follow Allegro
    ETCH subclass names.

    Use axlDBDisplayControl to control grid color and visibility.

    Grids have the following attributes:

    NAME TYPE DESCRIPTION
    ----------------------------------------
    objType string Name of the object - grids
    readOnly nil can modify object
    name string Name of grid
    xOrigin dbrep X origin of grid
    yOrigin dbrep Y origin of grid
    xMajor dbrep Major X spacing of grid (read-only)
    yMajor dbrep Major Y spacing of grid (read-only)
    xGrids l_dbrep Spacings X of grid (always a list of dbreps)
    yGrids l_dbrep Spacings Y of grid (always a list of dbreps)

    NEEDS
    t_gridName -- name of grid or nil to get all grir names
    RETURNS
    lt_gridds -- list of grids
    og_grid -- disembodied property list containing grid settings
    SEE ALSO
    axlDBGridGet
    EXAMPLE
    # get and print all grids
    grids = axlDBGridGet(nil)
    foreach(g grids
    grd = axlDBGridGet(g)
    printf("GRID name=%s values=%L\n", grd->name, grd)
    )


    NAME
    axlDBGridSet - set the design grid
    SYNOPSIS
    axlDBGridSet(
    og_grid
    ) ==> t/nil
    FUNCTION
    This modifies the grid settings in the design.

    In addition to the grid names (see axlDBGridGet), two symbolic
    grid names are available:
    'all - sets all grid values
    'etch - sets all ETCH grid values

    As a convenience when setting a single the xGrids or yGrids attribute,
    you can use a float.

    Both xMajor and yMajor values are automatically determined by the sum
    of the spacings in xGrids and yGrids respectively.
    NOTES
    - Non etch grids may not have multiple spacings. We only use the
    first grid seen.
    - Setting grids is not undo-able (this may change in the future).
    - Etch grids names are the same as ETCH layer names. This may
    change in the future.
    - Origin values must be within drawing extents or 0.
    - If Grid dialog is open it will not be updated if you change the grid
    settings via this API.
    NEEDS
    og_grid - a grid disembodied property list from axlDBGetGrid
    RETURNS
    t if changed grid, nil if failure
    SEE ALSO
    axlDBGridGet, axlDBDisplayControl
    EXAMPLES
    1) Modify TOP grid settings
    grid = axlDBGridGet("TOP")
    grid = axlDBG
    2) Modify all grids ( note allow xGrids and yGrids to NOT be listed)
    grid = axlDBGridGet("TOP")
    grid->name = 'all
    grid->xGrids = 5.0
    grid->yGrids = 5.0
    axlDBGridSet(grid)
    3) Modify all etch grids
    grid = axlDBGridGet("TOP")
    grid->name = 'etch
    grid->xGrids = '(5.0 7.0)
    grid->yGrids = '(5.0 6.0)
    axlDBGridSet(grid)
    • Cancel
    • Vote Up 0 Vote Down
    • Sign in to reply
    • Cancel
  • Ejlersen
    Ejlersen over 15 years ago

    Hi

    Thanks for the answer, just what I was looking for.

    Did a dumplist back at isr004 without finding it, so will redo dumplist in newest isr to see if I have it available

    Br

    Ole

    • Cancel
    • Vote Up 0 Vote Down
    • Sign in to reply
    • Cancel
  • Ejlersen
    Ejlersen over 15 years ago

    Hi

    I can see 2 more new functions in the newest ISR - axlDBDummyNet and axlDBTextBlockCreate

    Do anyone have a good description of those?

    Best regards

    Ole

    • Cancel
    • Vote Up 0 Vote Down
    • Sign in to reply
    • Cancel
  • Ejlersen
    Ejlersen over 15 years ago

    Hi

    I've made a few changes to Uri's original grids.il skill program. Currently I've not changed it to use the GridSet command, but just the GridGet.

    It now shows the value of the current non-etch x-grid and the current top layer xgrid for reference.

    I don't have the ISR number where this functionality was introduced and hence only allow the current grid to be shown if isr009 is installed. Otherwise it will just say that you need to update.

    Have fun

    Best regards

    Ole

    grids.zip
    • Cancel
    • Vote Up 0 Vote Down
    • Sign in to reply
    • Cancel
  • fxffxf
    fxffxf over 15 years ago

        NAME

             axlDBDummyNet - retrieve dummy nets
    FUNCTION
    axlDBDummyNet (
    g_mode
    ) -> lo_dbid/nil
    SYNOPSIS
    This returns all dummy nets in design.
    Two courtesy options are provided which are:
    - 'pin for any dummy net that has a pin return the first pin of the
    dummy net
    - 'shape for any dummy net that has a shape return the first shape of
    the dummy net

    Typically each dummy net in design will only have a single pin
    or shape but this may not always be the case. Clines or vias cannot,
    by themselves exist on a dummy.

    Symbols (dra) do not have dummy nets
    NEEDS
    g_mode: 'pin - return list of 1st pins on dummy nets
    'shape - return list of 1st shapes on dummy nets
    RETURNS
    t - success
    nil - failed due to incorrect arguments
    SEE ALSO
    axlIsDummyNet, axlDbidName
    EXAMPLES
    1) Print all 1st pins on dummy nets
    foreach( mapc x axlDBDummyNet('pin) printf("%s\n" axlDbidName(x)))
    2) Get all dummy nets on design
    p = axlDBDummyNet(nil)


    NAME
    axlDBTextBlockCreate - create a new text block
    SYNOPSIS
    axlDBTextBlockCreate(
    x_blockTemplate
    ?width f_width
    ?height f_height
    ?lineSpace f_lineSpace
    ?charSpace f_charSpace
    ?photoWidth f_photoWidth
    ) => x_textBlock/nil

    FUNCTION
    Creates a new block block from the template block number provided.
    By providing optional textblock charactistics

    You can get available text blocks by:
    lst = axlGetParam("paramTextBlock")

    NEEDS
    x_blockTemplate
    f_XXX values
    RETURNS
    x_textBlock - new text block
    nil - failed, Typically your exhausted the number block Allegro provides
    or one of the parameters is not the correct data type.
    SEE ALSO
    axlGetParam, axlSetParam, axlDBTextBlockCompact
    EXAMPLES
    - create a new text block based upon text block 1 but change width and height
    blockNum = axlDBTextBlockCreate(1 ?width 15.0 ?height 16.0
    • Cancel
    • Vote Up 0 Vote Down
    • Sign in to reply
    • Cancel
>
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