• 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 can I use the skill code to save flash symbol or shape...

Stats

  • Replies 4
  • Subscribers 17
  • Views 10035
  • Members are here 0
More Content

How can I use the skill code to save flash symbol or shape symbol?

Rosery
Rosery over 6 years ago

Hi all;

I have completed a skil file to create the flash symbol and shape symbol ,but I could not found a way to save them to disk.

Is there a way to save them?

  • Cancel
  • Sign in to reply
  • eDave
    eDave over 6 years ago

    axlSaveDesign

    • Cancel
    • Vote Up 0 Vote Down
    • Sign in to reply
    • Cancel
  • Rosery
    Rosery over 6 years ago in reply to eDave

    thanks for your apply, and this function is essentially the Allegro "save" command.

    What i meant is that there is a skill program (run in design) can   create shape symbols and flash symbols ,but I can only use them  in current design .

    More ,What I  wanted is  that how to save flash symbols and shape symbols to disk.

    • Cancel
    • Vote Up 0 Vote Down
    • Sign in to reply
    • Cancel
  • eDave
    eDave over 6 years ago in reply to Rosery

    This is relatively difficult to achieve. The best way is to create and run a script using Skill and run a separate session of allegro with the script file.

    Here's a function example that might help you:

    defun( AFn_createThermalFlash (name); eg. name = "th395od345id55g45"
    let((data, cwd, templateFile, fsm, p, scriptFileName, cmd)
    name = lowerCase(name)
    data = parseString(name, "th od id g")
    when(length(data) == 4
    data = mapcar('readstring data)
    cwd = getWorkingDir()
    templateFile = "[pathToTemplates]/blank_thermal_flash.dra"
    if(isFile(templateFile) then
    p = axlDMOpenFile("ALLEGRO_SCRIPT", "flash", "w")
    if(p then
    sprintf(fsm "%s/%s.fsm", cwd, name)
    when(isFile(fsm), axlOSFileMove(fsm, strcat(fsm, ".old")))
    scriptFileName = get_filename(p)
    fprintf(p, "setwindow pcb\n")
    fprintf(p, "generaledit\n")
    fprintf(p, "prmed\n")
    fprintf(p, "setwindow form.prmedit\n")
    fprintf(p, "FORM prmedit type Flash\n")
    fprintf(p, "FORM prmedit apply\n")
    fprintf(p, "FORM prmedit done\n")
    fprintf(p, "setwindow pcb\n")
    fprintf(p, "generaledit\n")
    fprintf(p, "add flash\n")
    fprintf(p, "setwindow form.thermflash\n")
    fprintf(p, "FORM thermflash indiam %2.3f\n", cadr(data) / 100.0)
    fprintf(p, "FORM thermflash outdia %2.3f\n", car(data) / 100.0)
    fprintf(p, "FORM thermflash spkwdth %2.3f\n", caddr(data) / 100.0)
    fprintf(p, "FORM thermflash spknum 4\n")
    fprintf(p, "FORM thermflash spkangl %d\n", cadddr(data))
    fprintf(p, "FORM thermflash done\n")
    fprintf(p, "setwindow pcb\n")
    fprintf(p, "save_as \"%s\\%s.dra\"\n", cwd, name)
    fprintf(p, "create symbol\n")
    fprintf(p, "fillin \"%s\\%s.fsm\"\n", cwd, name)
    fprintf(p, "exit\n")
    fprintf(p, "fillin no\n")
    drain(p)
    axlDMClose(p)
    sprintf(cmd, "allegro -s flash.scr -p %s %s", cwd, templateFile)
    shell(cmd)
    deleteFile(scriptFileName)
    axlUIConfirm(lsprintf("Local flash symbol created: %s", fsm))
    else
    axlUIConfirm("Error: Could not create flash script file", 'error)
    )
    else
    axlUIConfirm(lsprintf("Error: Could not create flash template: %s", templateFile), 'error)
    )
    )
    ))

    • Cancel
    • Vote Up 0 Vote Down
    • Sign in to reply
    • Cancel
  • Rosery
    Rosery over 6 years ago in reply to eDave

    thanks a lot 

    I'll try 

    • 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