• 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 2205
  • 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
  • AsbjornEdvalds
    0 AsbjornEdvalds 4 months ago

    Hi, 

    Firstly, how does your axlRunBatchDBProgram call look?

    Secondly, have you tried removing the whitespaces from the paths to both the cnv and dxf file? 

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

    Hi,
    I run axlRunBatchDBProgram like this : axlRunBatchDBProgram("dxf2a" cmddxf(cmd_dxf) ?logfile cmdNetlogdxf(namelog) ?startMsg "DXF Import")

    I've tried to delete the whitespaces but it doesn't work either.

    Thank.

    • Cancel
    • Vote Up 0 Vote Down
    • Sign in to reply
    • Verify Answer
    • Cancel
  • 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
  • DavidJHutchins
    0 DavidJHutchins 4 months ago in reply to Maxime1998

    I can't get this to work either Disappointed

    however I think it might be regarded to the 'working dir' vs the 'temp dir' locations,

    I noticed the log file has the temp design name relative to the 'working dir', example below:

    BRD file: D:/SPB_Data/Intel/Keystone_Flat_QP/#Taaaaak15200.dra

    however my 'temp dir' ( which is "C:\Users\David1\AppData\Local\Temp" ) has the following file:

    05/05/2025 01:27 PM 11,191 #Taaaabk15200.tmp

    I attempted to run 'dbdoctor' on that file with no success :(

    • 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
>
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