• 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. Problem Running dxf2a Command via Skill Form – Invalid Program...

Stats

  • State Suggested Answer
  • Replies 10
  • Answers 2
  • Subscribers 19
  • Views 2226
  • Members are here 0
More Content

Problem Running dxf2a Command via Skill Form – Invalid Program Arguments

Maxime1998
Maxime1998 4 months ago

Hello everyone,

I'm currently trying to create a form to simplify the import of DXF file.

I'm using the command "dxf2a" but i'm currently stuck with de command, i've read lot of documentation but i'm not sure why this command is not working.

Here is the error and the command name i'm using:

Starting DXF Import... (SPMHGE-268): dxf2a had errors, use Viewlog to review the log file.

nom de dxf2a : "C:/Cadence/SPB_17.4/tools/bin/dxf2a.exe -$ -u MM -v MM -a 4 -g C:/CAO/FGXXXXXXXYXX/INPUT/MECANIQUE/FGXXXXXXXYXXMID-1_PAGE_1 (1)_l.cnv C:/CAO/FGXXXXXXXYXX/INPUT/MECANIQUE/FGXXXXXXXYXXMID-1_PAGE_1 (1).dxf FGXXXXXXXYXX %s"

I'm using the axlRunBatchDBProgram fonction to run the dxf2a command to Cadence.

My viewlog file is looking like that:

ERROR: Invalid program arguments.

Terminating program.

In my code I'm generating the .cnv file like it should be and I don't think its the problem because I've tried to use the .cnv file generated by Cadence and it doesn't work either.

Thank you very much!

  • Sign in to reply
  • Cancel
Parents
  • Maxime1998
    0 Maxime1998 4 months ago

    Hello,

    A little update, I find the exact syntaxe for the dxf2a command. It should be written like this:

    "C:\Cadence\SPB_17.4\tools\bin\dxf2a.exe" "-u" "MM" "-v" "MM" "-a" "4" "-g" "filecnv.cnv" "filedxf.dxf" "fileBRD.brd".

    But i'm trying to send this commmand via axlRunBatchDBProgram, and there I have a new problem.

    Here's how I use the function: axlRunBatchDBProgram("dxf2a" cmddxf(cmd_dxf, num_page) ?logfile cmdNetlogdxf(namelog) ?startMsg "DXF Import..."). With the command looking like : "\"C:/Cadence/SPB_17.4/tools/bin/dxf2a.exe\" -$ \"-u\" \"MM\" \"-v\" \"MM\" \"-a\" \"4\" \"-g\" \"filecnv.cnv\" \"filedxf.dxf\" %s"

    Since I using axlRunBatchDBProgram, I'm supposed to use the argument "%s" for Cadence to get the board I'm using at that time. But right now Cadence is using a temporary board where it put the dxf that I want in my board. I don't how to show which board I want my dxf to be saved in because if I replace the "%s" argument by the name of my board I get an error and If I put them both It says that the dxf2a isn't correct.

    • Cancel
    • Vote Up 0 Vote Down
    • Sign in to reply
    • Verify Answer
    • Cancel
  • Hoangkhoipcb
    0 Hoangkhoipcb 4 months ago in reply to Maxime1998

    Hello Maxime1998!

    Select 1:

    cmd window:

    dxf2a -u MILS -v MM -a 2 -g  PKG_Training_DXF_cnv PKG_Training_DXF_dxf  PKG_Training_04_brd

    Select 2:

    cmd Allegro:

    axlRunBatchDBProgram("dxf2a" sprintf(nil "dxf2a -$ -u MILS -v MM -a 2 -g PKG_Training_DXF_cnv PKG_Training_DXF_dxf %%s") ?reloadDB t ?logfile "file.log")

    it works me well.

    Regards,

    Hoangkhoi.

    • Cancel
    • Vote Up 0 Vote Down
    • Sign in to reply
    • Verify Answer
    • Cancel
  • DavidJHutchins
    0 DavidJHutchins 4 months ago in reply to Hoangkhoipcb

    doesn't work for me importing into a dra

    \i (00:00:05) generaledit
    \i (00:00:27) skill 'axlRunBatchDBProgram("dxf2a" sprintf(nil "dxf2a -$ -u MILS -v MM -a 2 -g MULTIPACK_l.cnv MULTIPACK.dxf %%s" ?reloadDB t ?logfile "dxf2a.log"))'
    \t (00:00:27) Starting dxf2a...
    \e (00:00:28) ERROR(SPMHGE-268): dxf2a had errors, use Viewlog to review the log file.
    (00:00:29) 2
    \i (00:00:31) setwindow text
    \i (00:00:31) close

    D:\xxx\yyy>type dxf2a.log
    Reading Layer Conversion File
    Reading DXF file...
    done.
    ERROR: Opening file D:xxx/yyy/#Taaaaad14832.dra.
    ERROR: Opening D:/xxyyy/#Taaaaad14832.dra for incremental update failed.
    Terminating program.

    D:\xxx\yyy>

    • Cancel
    • Vote Up 0 Vote Down
    • Sign in to reply
    • Verify Answer
    • Cancel
  • Hoangkhoipcb
    0 Hoangkhoipcb 4 months ago in reply to DavidJHutchins

    Hi!

    skill 'axlRunBatchDBProgram("dxf2a" sprintf(nil "dxf2a -$ -u MILS -v MM -a 2 -p MULTIPACK_l.cnv MULTIPACK.dxf %%s" ?reloadDB t ?logfile "dxf2a.log"))'

    i changed -g -> -p

    -p creates a .dra file of sympackage type.

    try it one more time.

    HoangKhoi.

    • Cancel
    • Vote Up 0 Vote Down
    • Sign in to reply
    • Verify Answer
    • Reject Answer
    • Cancel
  • DavidJHutchins
    0 DavidJHutchins 4 months ago in reply to Hoangkhoipcb

    All the data I am attempting to import is mapped to the 'DRAWING FORMAT' class, so the '-p' option fails

    The -f option appears to work, however nothing is saved to disk:(

    D:\D:\XXX\YYY>tail allegro.jrl
    \i (00:01:18) close
    \i (00:01:20) setwindow pcb
    \i (00:01:20) open
    \i (00:01:44) fillin "menu_cancel"
    \i (00:01:44) generaledit
    \i (00:03:25) skill '`'axlRunBatchDBProgram("dxf2a" sprintf(nil "dxf2a -$ -u MILS -v MM -a 2 -f MULTIPACK_l.cnv MULTIPACK.dxf %%s" ?reloadDB t ?logfile "dxf2a.log"))`''
    \t (00:03:25) Starting dxf2a...
       (00:03:27) t
    \i (00:03:32) exit
    \t (00:03:33)     Journal end - Wed May 14 11:16:53 2025

    D:\D:\XXX\YYY>cat dxf2a.log
    Reading Layer Conversion File
    Reading DXF file...
    done.
    Layer conversion file: MULTIPACK_l.cnv
    DXF file: MULTIPACK.dxf
    BRD file: D:/D:/XXX/YYY/#Taaaaau00244.dra
    Update existing design?: NO
    Use default text?: NO
    DXF units: MILLIMETERS
    Design units: MILS
    Design precision: 2
    dxf2a complete.

    D:\D:\XXX\YYY>dir *dra
     Volume in drive D is New Volume
     Volume Serial Number is 902D-8197

     Directory of D:\D:\XXX\YYYP

    05/05/2025  09:57 AM           201,016 mp.dra
                   1 File(s)        201,016 bytes
                   0 Dir(s)  40,886,636,544 bytes free

    D:\D:\XXX\YYY>dir *log
     Volume in drive D is New Volume
     Volume Serial Number is 902D-8197

     Directory of D:\XXX\YYY

    05/14/2025  11:16 AM               713 downrev.log
    05/14/2025  11:16 AM               323 dxf2a.log
                   2 File(s)          1,036 bytes
                   0 Dir(s)  40,886,636,544 bytes free

    Any new suggestions?

    • Cancel
    • Vote Up 0 Vote Down
    • Sign in to reply
    • Verify Answer
    • Cancel
  • Hoangkhoipcb
    0 Hoangkhoipcb 4 months ago in reply to DavidJHutchins

    Hello David,
    Run the axlDesignType(t) command in the Allegro command window to check whether the -p and -f options are correct.
    Then try again.

    cmd:

    [-p | -m | -f | -s]
    Symbol file switch.
    -p creates a .dra file of sympackage type.
    -m creates a .dra file of symmechanical type.
    -f creates a .dra file of symformat type.
    -s creates a .dra file of symshape type.

    dxf2a -$ -u MILS -v MM -a 2 [...] MULTIPACK_l.cnv MULTIPACK.dxf  MULTIPACK.brd

    Also, change [....].

    Regards,

    HoangKhoi.

    • Cancel
    • Vote Up 0 Vote Down
    • Sign in to reply
    • Verify Answer
    • Cancel
  • Hoangkhoipcb
    0 Hoangkhoipcb 2 months ago in reply to DavidJHutchins

    Hello David!

    Today, I encountered the same issue as you. I found a solution for it.
    Please try again.

    'DRAWING FORMAT'  -> -f -> correct.

    axlRunBatchDBProgram("dxf2a" sprintf(nil "dxf2a -$ -u MILS -v MM -a 2 -f MULTIPACK_l.cnv MULTIPACK.dxf %%s" ?warnProgram t  ?reloadDB t ?logfile "dxf2a.log"))

    Regards,
    HoangKhoi.

    • Cancel
    • Vote Up 0 Vote Down
    • Sign in to reply
    • Verify Answer
    • Reject Answer
    • Cancel
Reply
  • Hoangkhoipcb
    0 Hoangkhoipcb 2 months ago in reply to DavidJHutchins

    Hello David!

    Today, I encountered the same issue as you. I found a solution for it.
    Please try again.

    'DRAWING FORMAT'  -> -f -> correct.

    axlRunBatchDBProgram("dxf2a" sprintf(nil "dxf2a -$ -u MILS -v MM -a 2 -f MULTIPACK_l.cnv MULTIPACK.dxf %%s" ?warnProgram t  ?reloadDB t ?logfile "dxf2a.log"))

    Regards,
    HoangKhoi.

    • Cancel
    • Vote Up 0 Vote Down
    • Sign in to reply
    • Verify Answer
    • Reject Answer
    • 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