• 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 Scripting - Skill
  3. Export DXF and ODB through skill

Stats

  • Replies 6
  • Subscribers 17
  • Views 13637
  • Members are here 0
More Content

Export DXF and ODB through skill

Eugene Yeoh
Eugene Yeoh over 7 years ago

Hello Guys,

I am try to develop a skill that export dxf and odb with single button, in this skill i aim to auto fill in the name of the layer and directory where the file should save.

Any idea which command we can use that?

I had try to do it with "replay script" but it not user friendly enough that the file name and directory are fixed.

Regards,

Eugene

  • Cancel
  • Sign in to reply
Parents
  • eDave
    eDave over 7 years ago

    Don't use a scipt to do this. Use axlRunBatchDBProgram and call th brd2odb executable with the parameters that you want.

    • Cancel
    • Vote Up 0 Vote Down
    • Sign in to reply
    • Cancel
Reply
  • eDave
    eDave over 7 years ago

    Don't use a scipt to do this. Use axlRunBatchDBProgram and call th brd2odb executable with the parameters that you want.

    • Cancel
    • Vote Up 0 Vote Down
    • Sign in to reply
    • Cancel
Children
  • Eugene Yeoh
    Eugene Yeoh over 7 years ago in reply to eDave

    Hi Dave,

    i try a2dxf but i not able to change the cnv file according to film user wanted to convert to dxf.

    for example:

    initial user manully use ABC.cnv to convert drill film to dxf(user can edit the cnv and save)
    second time user to ABC.cnv to convert soldermask film to dxf.(dxf that export is in drill film as axlRunBatchDBProgram did not include the parameter to edit the contain of cnv)

    any idea how can i edit the .cnv file according to user selected film?

    Regards,

    Eugene

    • Cancel
    • Vote Up 0 Vote Down
    • Sign in to reply
    • Cancel
  • Eugene Yeoh
    Eugene Yeoh over 7 years ago in reply to eDave

    may i know where can i find brd2odb command line arguments file?since it is from mentor.
    I not able to find inside batchhelp folder

    Thanks alot

    Eugene

    • Cancel
    • Vote Up 0 Vote Down
    • Sign in to reply
    • Cancel
  • B Bruekers
    B Bruekers over 7 years ago in reply to Eugene Yeoh

    Look for the Brd2odb_help.pdf in the directory where the ODB++ translator executable of Mentor is placed.

    In the PDF you have a section 'Using Command Line Parameters:'   

    The command line is 'brd2odb [parameters] <full path to input brd file>'

    You can see which commands are actually used, put this in the Allegro command prompt: set wait_debug

    Then the axlRunBatchDBProgram() commands are echoed in the commandline.

    The same is valid for the DXF export.

    For a simple DXF export to give you a head start:

    dxfFile = "dxf_output"
    fcnv = "DXF_mapping"
    layer = "TOP"
    p = axlDMOpenFile("ALLEGRO_CNV", fcnv, "w")
    fprintf(p "#This is the Layer Conversion File used for\n")
    fprintf(p "#importing DXF data into Allegro/APD.\n\n")
    fprintf(p "#CLASS!            SUBCLASS!                           DXF_LAYER!\n\n")
    fprintf(p "BOARD GEOMETRY!\n")
    fprintf(p "                   CUTOUT!                             OUTLINE!\n\n")    
    fprintf(p "BOARD GEOMETRY!\n")
    fprintf(p "                   DESIGN_OUTLINE!                    OUTLINE!\n\n")
    fprintf(p "PACKAGE GEOMETRY!\n")
    fprintf(p "                   ASSEMBLY_%s!                       PACKAGE!\n\n" layer)
    fprintf(p "PIN!\n")
    fprintf(p "                   %s!                                PIN!\n\n" layer)
    fprintf(p "REF DES!\n")
    fprintf(p "                   DISPLAY_%s!                        REF_DES!\n\n" layer)
    fprintf(p "#END\n")
    axlDMClose(p)
    sprintf(str "a2dxf -$ -u MM -a 3 -f 12 -c L \"%s.cnv\" \"%s/%s_%s.dxf\" %%s" fcnv getWorkingDir() dxfFile layer )
    res= axlRunBatchDBProgram("Generating DXF File... " str  ?noLogview t  ?warnProgram t ?noExitMsgs t)
    deleteFile(strcat(getWorkingDir() "/" fcnv ".cnv"))

    Kr, Bram

    • Cancel
    • Vote Up 0 Vote Down
    • Sign in to reply
    • Cancel
  • Eugene Yeoh
    Eugene Yeoh over 7 years ago in reply to B Bruekers

    Hi Kr,Bram

    Thanks for reply, i cannot find the Brd2odb_help.pdf, do you mind to attach one for me?

    Thanks
    Eugene

    • Cancel
    • Vote Up 0 Vote Down
    • Sign in to reply
    • Cancel
  • B Bruekers
    B Bruekers over 7 years ago in reply to Eugene Yeoh

    It should be present when you install the Allegro ODB translator. (look in the C:\MentorGraphics directory, or in the c:\program files)

    Here it is, but be aware that it is not the latest version.

    3666.Brd2odb_help.pdf

    • 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