• 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. Allegro crashes opening a new design after Skill routine...

Stats

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

Allegro crashes opening a new design after Skill routine uses axlEnterPoint

joma
joma over 9 years ago

Hi, I have written a routine to output the min track, gap and annular ring values etc which works ok. It will happily update text on drawing layers if they exist already. If the text does not exist the user is prompted for a position for the new data. This is where the problem starts. All seems ok and the design checks out and can be saved. However, if I try to open another design Allegro crashes and creates a .sav file in the directory of the other design or symbol. Just to be clear, there is never a problem if the text to be updated is alredy in the design, only when there is a prompt for position. Here is a snippet:

layer_count = length(axlGetParam("paramLayerGroup:etch")->groupMembers)
l_text = axlGetSelSet()
        foreach(text_t l_text
                when(text_t->text
                    if(rexMatchp("^Number of LAYERS.*$" text_t->text) ; Lower case writing on is on layer Outline.
                    then
                    layno_xy = text_t->xy
                    layCountText = sprintf(nil, "%n", layer_count )
                    newText = strcat("Number of LAYERS:", " ", layCountText )
                    replaceText(text_t newText)
                        ) ;end if
                    ) ; when
                ) ; end foreach

                        unless(layno_xy
                            axlSetActiveLayer("DRAWING FORMAT/DRILL")
                            axlVisibleDesign(nil)  axlUIWUpdate(nil)
                            axlVisibleLayer("DRAWING FORMAT/DRILL" t)
                            axlVisibleUpdate(t)
                            axlClearSelSet() axlAddSelectAll()
                            l_text = axlGetSelSet()

                            foreach(text_t l_text
                                    when(text_t->text
                                        if(rexMatchp("^NUMBER OF LAYERS.*$" text_t->text)
                                        then    
                                        layno_xy = text_t->xy
                                        textOrientNumLayDrill = axlTextOrientationCopy(text_t)
                                        axlDeleteObject(text_t)
                                            ) ; end if
                                        ) ; when
                                     ) ; end foreach

                                unless(layno_xy
                                    layno_xy = axlEnterPoint(?prompts list("Pick Number of layers TEXT POSITION:"))
                                    textOrientNumLayDrill = defaultOrient
                                    ) ; end unless
                             ) ; end unless

                    when( textOrientNumLayDrill
                 axlDBCreateText(sprintf(nil "NUMBER OF LAYERS: %n" layer_count), layno_xy,
                                                textOrientNumLayDrill, "DRAWING FORMAT/DRILL", nil)
                        ) ; when

Any ideas ?

Jim O'Mahony

  • Sign in to reply
  • Cancel
  • eDave
    eDave over 9 years ago
    Try registering your calling command as "interactive".
    Also, be careful naming functions with lowercase first letters (replaceText). Cadence gives no guarantee that there won't be a conflict with internal commands. Name it something like ST_replaceText. Ensure that you have no memory leaks - declare all your variables and check the code using sklint.
    • Cancel
    • Vote Up 0 Vote Down
    • Sign in to reply
    • Cancel
  • joma
    joma over 9 years ago

    Ok, thanks Dave, I renamed all functions and put all variables inside let() commands. I can't check with sklint as I do not have the skill toolbox.
    My problem is that when I call the command as interactive it throws up another problem with the script calls that create the reports
    that the routine is based on (W-Cannot exit current application). I could create the reports with another skill file except for the one
    that writes the drcs. That needs to be done after the metal to metal rules are changed temporarily and before they are changed back
    again. I would attach a .zip of the file but the attach icon is greyed out.

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

    Ah. Yes I try to avoid scripts inside Skill routines.

    Try sklint, you might be surprised.

    • Cancel
    • Vote Up 0 Vote Down
    • Sign in to reply
    • Cancel
  • joma
    joma over 9 years ago

    I would love to try sklint but unfortunately we don't have it and I don't see my company paying for a licence.
    I think axlExtractToFile() with the view drc_rep will get me the drc report but I will have to search for how to create
    a view that will give me something similar to the "Etch Detailed Length Report" that I am using.

    • Cancel
    • Vote Up 0 Vote Down
    • Sign in to reply
    • Cancel
  • eDave
    eDave over 9 years ago
    Try typing sklint(?file [your skill filename]) on the Skill command line.

    You can find all the Metal-Metal drcs by using the command:
    drcs = setof(obj, axlDBGetDesign() ->drcs, obj ->name == "Minimum Metal Spacing")

    From this list you can produce your own report:
    outPort = axlDMOpenFile("MISC", "drcReport.txt", "w")
    foreach(drc, drcs, fprintf(outPort, "%L Layer: %s, Expected: %s, Actual:%s\n", drc ->xy, drc ->layer, drc ->expectd, drc ->actual))
    axlDMClose(outPort)
    axlUIViewFileCreate("drcReport.txt", "drcs", nil)
    • 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