• 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. How to use quotes on skill command on Windows

Stats

  • Replies 1
  • Subscribers 18
  • Views 9466
  • Members are here 0
More Content

How to use quotes on skill command on Windows

ANSYS
ANSYS over 4 years ago

Hi,

I'm creating a menu to handle and export some results to Excel and I'm having troubles to use paths with spaces. I tried to use the "\"" approach but it still doesn't work for the arguments. In my case I'm trying to open a csv file like below:

csvinput="C:\\temp\\tmp space\\mydata.csv"

path=axlGetVariable("CURRENT_OFFICE_VERSION")
cmdOpenCSV=strcat( "\"" path "\\EXCEL.EXE" "\" \"" csvinput "\"" )
cid = ipcBatchProcess(cmdOpenCSV "" "c:\\temp\\skill_log.txt")

If I place mydata.csv on a folder without spaces, it works. Also, strangely enough the "\"" worked for excel's path as it also has white spaces. Could someone please comment on that? 

Thanks in advance.

  • Cancel
  • Sign in to reply
  • B Bruekers
    B Bruekers over 4 years ago

    You need to 'double' escape the csv path so it creates a \"<csv file>\"  string which then appears as  "<csv file>"  is the actual command line.

    cmdOpenCSV=strcat( "\"" path "\\EXCEL.EXE" "\" \\\"" csvinput "\\\"" )

    • Cancel
    • Vote Up +1 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