• 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. call a skill function from script

Stats

  • Replies 6
  • Subscribers 159
  • Views 17878
  • Members are here 0
More Content

call a skill function from script

irpcbdes999
irpcbdes999 over 8 years ago

hi all,

need a little help calling a skill function from script.

I have a skill file doSomething.il and a function CalldoSomething(). i have it working if i call the CalldoSomething() from a file, but can't make it work to call from a script file.  The file doSomething.il is loaded during the allegro start up using custom menu load method, so there is no problem calling the function CalldoSomething() from a menu, but if i try to call the function from  a script I'm getting Command not found.

for version1 "Command not found: CalldoSomething() "

for version 2 " Command not found: load("doSomething.il") "

any help how to call skill function from a script ? thanks.

i have tried this 2 versions in the script file the fallowing:

version 1

# Allegro script

some script code

...

skill
load("doSomething.il")
CalldoSomething()
skill exit

version 2

# Allegro script

some script code

...

skill
CalldoSomething()
skill exit

  • Sign in to reply
  • Cancel
  • jwhend
    jwhend over 8 years ago
    Add skill in front of load.
    skill load("doSomething.il")
    • Cancel
    • Vote Up 0 Vote Down
    • Sign in to reply
    • Cancel
  • eDave
    eDave over 8 years ago

    You should use axlCmdRegister to register your command and run it that way.

    ie axlCmdRegister("call do something" 'CalldoSomething)

    In your script then just have the line:

    call do something

    • Cancel
    • Vote Up 0 Vote Down
    • Sign in to reply
    • Cancel
  • irpcbdes999
    irpcbdes999 over 8 years ago
    Hi Dave,
    i have a custom menu from which i'm loading several .il files.
    in my doSomething.il I have already
    axlCmdRegister("CalldoSomething" `call_do_something)
    procedure( call_do_something()
    ... some code
    )
    do i need to redefine it again in the script file ?
    by the way, can I ask you what is the difference between first and second statement in the parameter axlCmdRegister ?
    axlCmdRegister("FirstStatment" `secondStatment) is the secondStatment registering the function name in the allegro shell, and FirstStatment how to call from outside ?
    I've seen some code that uses same name for both, but I not sure I fully understand how they are different.

    thanks for help
    Serge
    • Cancel
    • Vote Up 0 Vote Down
    • Sign in to reply
    • Cancel
  • eDave
    eDave over 8 years ago
    Your axlCmdRegister calls should be in you allegro.ilinit file along with a load or autoload statement.
    The first parameter is what you would type on the command line in the Allegro console window. The second is the Skill function. They can be the same name.
    • Cancel
    • Vote Up 0 Vote Down
    • Sign in to reply
    • Cancel
  • irpcbdes999
    irpcbdes999 over 8 years ago
    i have in the fallowing setup
    ; allegro.ilinit
    ;Create Dir Skill 8.1
    ;Allegro Command(s) = Draw_A_Line
    load("draw_a_line.il")
    ------------------
    ; draw_a_line.il
    ; Draw a line
    ; Draws a line with defined x and y coordinates

    axlCmdRegister( "draw_a_line" `draw_a_line)
    ------------------
    ; somescript.scr
    # some code
    skill
    load("draw_a_line.il")
    draw_a_line()
    skill exit
    • 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