• 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. Export DXF.

Stats

  • Replies 28
  • Subscribers 161
  • Views 23748
  • Members are here 0
More Content

Export DXF.

vimaldevlpr
vimaldevlpr over 6 years ago

Hai,

I don't  know how to export DXF for all the present layer by once itself  by using  File->Export->DXF we only take the present layer.  For another we need to change that layer and once again i want to do the same process in this case how to take all the layer by once itself  any one guide me please. if it possible by skill share me the code please.

  • Sign in to reply
  • Cancel
Parents
  • Gowtham229
    Gowtham229 over 6 years ago

    hi what was your actual concern do you want to take all the layer in dxf at once

    • Cancel
    • Vote Up 0 Vote Down
    • Sign in to reply
    • Cancel
  • vimaldevlpr
    vimaldevlpr over 6 years ago in reply to Gowtham229

    Hai gowtham thanks for your reply it actually takes much time for taking again and again if it once means very easy  thats why if it possible can you please say how to do.

    • Cancel
    • Vote Up 0 Vote Down
    • Sign in to reply
    • Cancel
  • vimaldevlpr
    vimaldevlpr over 5 years ago in reply to Sivaji Chowdary

    Hi Sivaji,

    Actually that is a full code add function thats enougth to execute DXF file ok i too attach the code below.

    DXF.il

     procedure( DXF()
     l_cnvFiles = nil
        designName = axlCurrentDesign()
        foreach(filmName axlGetParam("artwork")->groupMembers
            f = strcat("DXF_" filmName)
            p = axlDMOpenFile("ALLEGRO_CNV" f "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")
            foreach(layer axlGetParam(strcat("artwork:" filmName))->groupMembers
                layerStr = parseString(layer "/")
                fprintf(p "%s!\n%s!%s!\n\n" car(layerStr) cadr(layerStr) strcat(car(layerStr) "_" cadr(layerStr)))
            )
            fprintf(p "#END\n")
            push(get_filename(p) l_cnvFiles)
            axlDMClose(p)
            sprintf(cmd "a2dxf -$ -u MM -a 3 -f 12 -c L \"%s.cnv\" \"%s/%s_%s.dxf\" %%s" f getWorkingDir() designName filmName)
            axlRunBatchDBProgram("Creating DXF File" cmd ?warnProgram t ?noExitMsgs t)
        )
        errset(mapcar('deleteFile l_cnvFiles) t)
    )
    axlCmdRegister("DXF" 'DXF)

    To execute this file:

    Place the .il file in .brd file location.

    Then in allegro tool use command mentioned below.

    1. In CIW Command

    2. load("DXF.il")

    3. DXF()

    • Cancel
    • Vote Up 0 Vote Down
    • Sign in to reply
    • Cancel
  • Sivaji Chowdary
    Sivaji Chowdary over 5 years ago in reply to vimaldevlpr

    Thank you Vimal.

    • Cancel
    • Vote Up 0 Vote Down
    • Sign in to reply
    • Cancel
  • AS202407274910
    AS202407274910 over 1 year ago in reply to vimaldevlpr

    Can anyone please help me with the conversion file to export dxf in one go. As I am new to cadence and have no knowledge of this. Please help me with above and guide me. thankyou.

    • Cancel
    • Vote Up 0 Vote Down
    • Sign in to reply
    • Cancel
  • DavidJHutchins
    DavidJHutchins over 1 year ago in reply to AS202407274910

    the  text shown below is an Allegro script that will output all layer to a dxf file

    In allegro enter the command: replay dxf_out_all.scr

    # dxf_out_all.scr
    generaledit
    color192
    generaledit
    QtSignal CVDLayerContainer CVDVisibilityOn clicked
    QtSignal ColorVisibilityDialog CVDOkButton clicked
    dxf out
    setwindow form.dxf_out
    FORM dxf_out dxffile all
    FORM dxf_out dxfformat 'Revision 14'
    FORM dxf_out units INCHES
    FORM dxf_out accuracy 3
    FORM dxf_out accuracy 4
    FORM dxf_out edit
    setwindow form.dxfOutMapping
    FORM dxfOutMapping selectall YES
    FORM dxfOutMapping usedefaultlayernames YES
    FORM dxfOutMapping map
    FORM dxfOutMapping done
    fillin yes
    setwindow pcb
    updateport CVPane
    setwindow form.dxf_out
    FORM dxf_out exportsymbols YES
    FORM dxf_out exportpadstacks YES
    FORM dxf_out drillinfo YES
    FORM dxf_out execute
    FORM dxf_out close
    setwindow pcb
    generaledit

    # end of file

    • Cancel
    • Vote Up 0 Vote Down
    • Sign in to reply
    • Cancel
  • AS202407274910
    AS202407274910 over 1 year ago in reply to DavidJHutchins

    David Thank you for the script. But this script exports all layers in one dxf file. But every layer to be exported separately in one go. Could you please help me with the script.

    • Cancel
    • Vote Up 0 Vote Down
    • Sign in to reply
    • Cancel
Reply
  • AS202407274910
    AS202407274910 over 1 year ago in reply to DavidJHutchins

    David Thank you for the script. But this script exports all layers in one dxf file. But every layer to be exported separately in one go. Could you please help me with the script.

    • Cancel
    • Vote Up 0 Vote Down
    • Sign in to reply
    • Cancel
Children
  • DavidJHutchins
    DavidJHutchins over 1 year ago in reply to AS202407274910

    The 'DXF.il' code posted by vimaldevlpr 5 years ago should do what you want...

    • Cancel
    • Vote Up 0 Vote Down
    • Sign in to reply
    • Cancel
  • Daniel
    Daniel over 1 year ago in reply to DavidJHutchins

    could you please help a code for import all DXF file into another board a quickly?

    thanks

    • Cancel
    • Vote Up 0 Vote Down
    • Sign in to reply
    • Cancel
  • AS202407274910
    AS202407274910 over 1 year ago in reply to DavidJHutchins

    Please help me how to save that .il file and execute the code. Please please…….

    • Cancel
    • Vote Up -1 Vote Down
    • Sign in to reply
    • Cancel
  • DavidJHutchins
    DavidJHutchins over 1 year ago in reply to AS202407274910

    Save the following skill code into the file 'DXF.il'

    procedure( DXF()

      let((l_cnvFiles DesignName f p LayerStr cmd)

        l_cnvFiles = nil
        designName = axlCurrentDesign()
        foreach(filmName axlGetParam("artwork")->groupMembers
            f = strcat("DXF_" filmName)
            p = axlDMOpenFile("ALLEGRO_CNV" f "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")
            foreach(layer axlGetParam(strcat("artwork:" filmName))->groupMembers
                layerStr = parseString(layer "/")
                fprintf(p "%s!\n%s!%s!\n\n" car(layerStr) cadr(layerStr) strcat(car(layerStr) "_" cadr(layerStr)))
            )
            fprintf(p "#END\n")
            push(get_filename(p) l_cnvFiles)
            axlDMClose(p)
            sprintf(cmd "a2dxf -$ -u MM -a 3 -f 12 -c L \"%s.cnv\" \"%s/%s_%s.dxf\" %%s" f getWorkingDir() designName filmName)
            axlRunBatchDBProgram("Creating DXF File" cmd ?warnProgram t ?noExitMsgs t)
        )
        errset(mapcar('deleteFile l_cnvFiles) t)

     )
    )
    axlCmdRegister("DXF" 'DXF)

    then in Allegro at the 'command>' prompt enter the following:

    skill load 'DXF.il'

    DXF

    • Cancel
    • Vote Up 0 Vote Down
    • Sign in to reply
    • Cancel
  • DavidJHutchins
    DavidJHutchins over 1 year ago in reply to DavidJHutchins

    Opps, change the the registered command name from 'DXF' to 'ART_DXF' as it breaks the original 'dxf in' and 'dxf out' commands

    • 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