• 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. Calling printf inside axlShell

Stats

  • Replies 7
  • Subscribers 158
  • Views 14851
  • Members are here 0
More Content

Calling printf inside axlShell

kumarsanj
kumarsanj over 8 years ago

Hi,

Is it possible to call printf function inside the AXLShell?

Thanks,

Sanjeev

  • Sign in to reply
  • Cancel
  • DavidJHutchins
    DavidJHutchins over 8 years ago

    Command > skill 'printf("this is a test")'
    this is a test
    t
    Command > skill 'axlShell "(printf `\"this is a test2`\")" '
    this is a test2`
    t
    t
    Command >

    • Cancel
    • Vote Up 0 Vote Down
    • Sign in to reply
    • Cancel
  • kumarsanj
    kumarsanj over 8 years ago
    David,
    Thanks for responding to this query.

    Actually i am trying to do something as below

    Board_name=axlGetDrawingName()
    axlShell("artwork")
    axlShell("setwindow form.film_control")
    axlShell("FORM film_control filename_prefix fprintf( %s\n", Board_name))

    However looks like it doesnot allow the above fprintf function inside of the axlShell command.
    Could you please help me for the above logic? How can I call Board_name after "axlShell("FORM film_control filename_prefix"

    Regards,
    Sanjeev
    • Cancel
    • Vote Up 0 Vote Down
    • Sign in to reply
    • Cancel
  • DavidJHutchins
    DavidJHutchins over 8 years ago

    You might want to try the following:

    skill 'axlShell(strcat("FORM film_control filename_prefix " (axlCurrentDesign) "_"))'

    I used (axlCurrentDesign) since it only returns the base filename, axlGetDrawingName() returns the full pathname

    • Cancel
    • Vote Up 0 Vote Down
    • Sign in to reply
    • Cancel
  • kumarsanj
    kumarsanj over 8 years ago
    Excellent David.
    This is what I was looking for.
    Thank you very much.

    Regards,
    Sanjeev
    • Cancel
    • Vote Up 0 Vote Down
    • Sign in to reply
    • Cancel
  • kumarsanj
    kumarsanj over 8 years ago
    David I have One more query.

    I want to set the Format of ARTWORK-->General parameter tab as below.
    Integer place to 5 and
    Decimal place to 5.
    And below is the code for the same.

    axlShell("artwork")
    axlShell("setwindow form.film_control")
    axlShell("FORM film_control format_dec_places 5.0")
    axlShell("FORM film_control format_int_places 5.0")

    But it doesn't set the value as required.

    Do you have any idea on this?

    Thank you.
    Sanjeev
    • 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