• 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. optional command argument

Stats

  • Replies 2
  • Subscribers 159
  • Views 14062
  • Members are here 0
More Content

optional command argument

Ejlersen
Ejlersen over 13 years ago

Hi

For defun and procedure it is possible to define optional arguments

e.g., defun mycommand ( @optional (nogui nil))

Inside my program I can call the defun with or without the argument as

mycommand or mycommand(t)

however, I would like to be able to use this inside PCB Editor to execute the program with an optional argument, how is that accomplished. I do not seem to be able to find anything in the documentation for axlCmdRegister on this topic.

The command prompt keeps saying command not found mycommand(t)

Any suggestions?

Best regards

Ole

  • Sign in to reply
  • Cancel
  • fxffxf
    fxffxf over 13 years ago

     on the allegro cmd line just do (without the parens):

           mycommand t

    Notes:

      - Input data is always passed as a string.

      - you might want to use the @rest method since the Allegro cmd line divides up arguments based on whitespace. Skill will throw an error if the user does: mycommand foo bar

    • Cancel
    • Vote Up 0 Vote Down
    • Sign in to reply
    • Cancel
  • Ejlersen
    Ejlersen over 13 years ago

    Hi

    Yes, offcourse that was the problem. just got to used to using the skill development window and did the same in PCB Editor :-)

    Thanks for the suggestion for @rest, I can see that I get an error if I type more than one argument but I suppose the same will be true for both rest and optional?

    Best regards

    Ole

    • 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