• 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. Deleting / Adding subclasses in existing Artwork films

Stats

  • Replies 5
  • Subscribers 19
  • Views 12410
  • Members are here 0
More Content

Deleting / Adding subclasses in existing Artwork films

Arashk
Arashk over 7 years ago

With the new version update, Cadence prefers to use DESIGN_OUTLINE and CUTOUT instead of OUTLINE subclass, I wanted to write a script that will go through the existing films in the design and replace the OUTLINE subclass with these two subclasses. (I am very new to SKILL) 

I've tried using the ; axlDeleteObject() and axlfcreate()  functions but I could only get them to delete / create films, not subclasses.

Cheers ,

Arash

  • Sign in to reply
  • Cancel
Parents
  • B Bruekers
    B Bruekers over 7 years ago

    You need to go through each existing film and replace the outline layer with the designoutline+cutout.

    If you call axlFilmCreate() with all the existing film parameters and the updated layer list then it will replace this film.

    So something like this:

    procedure(updateFilmTo172()
    let( ( filmParam l_members res)
    foreach(filmStr axlGetParam("artwork")->groupMembers
        filmParam = axlGetParam(strcat("artwork:" filmStr))
        when(filmParam->groupMembers
            ;make all upperCase
            l_members = mapcar('upperCase filmParam->groupMembers)
            ;check if OUTLINE is present
            if(member("BOARD GEOMETRY/OUTLINE"    l_members)
            then
                ;if so, remove it
                l_members = remove("BOARD GEOMETRY/OUTLINE"    l_members)
                ;add 2 new layers
                push( "BOARD GEOMETRY/DESIGN_OUTLINE"    l_members)
                push( "BOARD GEOMETRY/CUTOUT"            l_members)
                res = axlFilmCreate(
                        filmParam->name
                        ?negative                          filmParam->negative                
                        ?undefineLineWidth          filmParam->undefineLineWidth        
                        ?sequence                   filmParam->sequence                
                        ?rotation                   filmParam->rotation                
                        ?xOffset                    car(filmParam->offset)
                        ?yOffset                    cadr(filmParam->offset)    
                        ?shapeBoundingBox           filmParam->shapeBoundingBox        
                        ?mirrored                   filmParam->mirrored                
                        ?fullContact                filmParam->fullContact            
                        ?suppressUnconnectPads      filmParam->suppressUnconnectPads    
                        ?drawMissingPadApertures    filmParam->drawMissingPadApertures
                        ?useApertureRotation        filmParam->useApertureRotation    
                        ?suppressShapeFill          filmParam->suppressShapeFill        
                        ?vectorBasedPad             filmParam->vectorBasedPad        
                        ?drawHolesOnly              filmParam->drawHolesOnly            
                        ?layers                        l_members            
                        ?domains                    filmParam->domains                
                        ?ipc2581                    filmParam->ipc2581        
                    )
                if(res
                then axlMsgPut('("Film %s \t: Updated" 1) filmParam->name)
                else axlMsgPut('("Film %s \t: Not updated!" 3) filmParam->name)
                )        
            else    
                 axlMsgPut('("Film %s \t: No update needed." 1) filmParam->name)
            )
        )
    )
    );let
    );procedure

    • Cancel
    • Vote Up +1 Vote Down
    • Sign in to reply
    • Cancel
Reply
  • B Bruekers
    B Bruekers over 7 years ago

    You need to go through each existing film and replace the outline layer with the designoutline+cutout.

    If you call axlFilmCreate() with all the existing film parameters and the updated layer list then it will replace this film.

    So something like this:

    procedure(updateFilmTo172()
    let( ( filmParam l_members res)
    foreach(filmStr axlGetParam("artwork")->groupMembers
        filmParam = axlGetParam(strcat("artwork:" filmStr))
        when(filmParam->groupMembers
            ;make all upperCase
            l_members = mapcar('upperCase filmParam->groupMembers)
            ;check if OUTLINE is present
            if(member("BOARD GEOMETRY/OUTLINE"    l_members)
            then
                ;if so, remove it
                l_members = remove("BOARD GEOMETRY/OUTLINE"    l_members)
                ;add 2 new layers
                push( "BOARD GEOMETRY/DESIGN_OUTLINE"    l_members)
                push( "BOARD GEOMETRY/CUTOUT"            l_members)
                res = axlFilmCreate(
                        filmParam->name
                        ?negative                          filmParam->negative                
                        ?undefineLineWidth          filmParam->undefineLineWidth        
                        ?sequence                   filmParam->sequence                
                        ?rotation                   filmParam->rotation                
                        ?xOffset                    car(filmParam->offset)
                        ?yOffset                    cadr(filmParam->offset)    
                        ?shapeBoundingBox           filmParam->shapeBoundingBox        
                        ?mirrored                   filmParam->mirrored                
                        ?fullContact                filmParam->fullContact            
                        ?suppressUnconnectPads      filmParam->suppressUnconnectPads    
                        ?drawMissingPadApertures    filmParam->drawMissingPadApertures
                        ?useApertureRotation        filmParam->useApertureRotation    
                        ?suppressShapeFill          filmParam->suppressShapeFill        
                        ?vectorBasedPad             filmParam->vectorBasedPad        
                        ?drawHolesOnly              filmParam->drawHolesOnly            
                        ?layers                        l_members            
                        ?domains                    filmParam->domains                
                        ?ipc2581                    filmParam->ipc2581        
                    )
                if(res
                then axlMsgPut('("Film %s \t: Updated" 1) filmParam->name)
                else axlMsgPut('("Film %s \t: Not updated!" 3) filmParam->name)
                )        
            else    
                 axlMsgPut('("Film %s \t: No update needed." 1) filmParam->name)
            )
        )
    )
    );let
    );procedure

    • Cancel
    • Vote Up +1 Vote Down
    • Sign in to reply
    • Cancel
Children
  • Arashk
    Arashk over 7 years ago in reply to B Bruekers

    Thank you, very well written! 

    • Cancel
    • Vote Up 0 Vote Down
    • Sign in to reply
    • Cancel
  • Quarkdog1
    Quarkdog1 over 5 years ago in reply to Arashk

    Can someone post the skill file for this as. It would be super useful for me.

    • Cancel
    • Vote Up +1 Vote Down
    • Sign in to reply
    • Cancel
  • BlueSaab37
    BlueSaab37 over 5 years ago in reply to Quarkdog1

    I was able to run this script as-is. 

    Save the lines to a text file called "updateFilmTo172.il", and save it in your skill folder.

    Open a board in PCB Editor, click in the command window, and type these lines:
    skill
    load "c:\\<path to skill file>\\updateFilmTo172.il"
    updateFilmTo172
    <click in the command window again>
    exit

    This should change all the film control layers to delete the outline layer, and add the design_outline and cutout layers.

    Note that this does not actually change or move the board outline; this JUST changes the gerber outputs.

    Seth

    • Cancel
    • Vote Up 0 Vote Down
    • Sign in to reply
    • Cancel
  • Kirti Sikri
    Kirti Sikri over 5 years ago in reply to BlueSaab37

    You can load a particular SKILL file by typing the following command at the Allegro PCB Editor command line:

         Command > skill load("skill_file_name.il")

    If it is successfully loaded, the PCB Editor command line will report a "t" as the last entry. The SKILL file will only load if the file is present in the SKILL search path. To find the SKILL search path, you can type the following command on the command line:

         Command > skill getSkillPath()
    More details you can refer to the following article:

    How to load and use SKILL files in Allegro PCB Editor

    • 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