• 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. Blogs
  2. System, PCB, & Package Design
  3. BoardSurfers: Allegro SKILL Database Objects
Kirti Sikri
Kirti Sikri

Community Member

Blog Activity
Options
  • Subscribe by email
  • More
  • Cancel
CDNS - RequestDemo

Try Cadence Software for your next design!

Free Trials
PCB
allegro database
BoardSurfers
PCB Editor
skill language
PCB design
Allegro PCB Editor
SKILL
Allegro

BoardSurfers: Allegro SKILL Database Objects

21 Nov 2023 • 8 minute read

 Allegro PCB Editor stores design data as various types of objects in a proprietary database format. These object types can create a complete representation of an electronic circuit. You can create, operate on, and extract information from the database using AXL SKILL function calls (APIs). For example, the following Allegro SKILL code prints the reference designator and XY location of all the components in a design.

skill_database database_objects

A clear understanding of database objects helps you write useful Allegro SKILL programs. In this blog post, we will learn about the different types of database objects supported by Allegro PCB Editor.

Allegro SKILL

Allegro SKILL (AXL SKILL) is an extension of the core Cadence SKILL language. All Allegro PCB Editor SKILL functions or API names begin with axl. These AXL functions are classified into families that typically have similar calling sequences and share a common part in their names. For example, the axlDBCreate family, with members such as axlDBCreateShape and axlDBCreateSymbol creates shapes or symbols. Similarly, functions of the axlForm family, such as axlFormCallback, axlFormSetField, and axlFormGetField, are related to GUI creation. These SKILL functions are explained in detail in the blog post, Creating GUIs Using Allegro SKILL.

The AXL SKILL functions are used to access the Allegro PCB Editor database, its display, and user interfaces. The following illustration displays various types of Allegro SKILL APIs:

 AXL_SKILL

Allegro SKILL Database Objects

The AXL SKILL database stores both physical and logical information of a layout design. Physical information includes geometrical shapes and objects (connecting etch). Logical information includes nets and logical components. This information can be processed using core SKILL functions.

Database objects can be classified into the following types:

  • Figure objects: Vias, Pins, Symbols, and Padstacks
  • Logical objects: Components, Functions, Function Pins, and Nets
  • Parameter objects: Display, Layer, Textblock, and Group
  • Property dictionary objects: AXL SKILL stores each property definition of an object. The property definition is indirectly associated with an object and can be accessed to find its value. You can also create new user-defined properties using AXL SKILL functions.

Database Id

Each Allegro PCB Editor database object has a unique database identifier (dbid) associated with it. For example, you can use  axlDBGetDesign to get the dbid of a root design.

The value of database id (dbid:<number>) varies from design to design.

A function that operates on a database object, when called, requires the dbid of the object as an argument. For example, axlDBGetExtents(o_dbid g_visibleOnly) provides the extent of a physical database object, where o_dbid is the dbid of an element.

You use AXL functions to create dbid of any object. Also, you cannot change dbid directly, except for parameter database ids.

Object Types and Attributes

Each Allegro PCB Editor object has a set of attributes that describe its functionality or behavior. For example, each symbol object has an attribute objType with a value symbol.  Another attribute isMirrored, returns the value t if the symbol is mirrored or nil if it is not. The attributes of the symbol definition are shown in the following table:

Symdef (Symbol Definition) Attributes

Attribute Name

Attribute Type

Description

bBox

bBox

Bounding box

children

l_dbid

List of children making up the symbol

instances

l_dbid

List of symbol instances using this symbol

name

string

Name of symbol definition

ObjType

string

Type of object. For symbol definition, it is symdef

parent

dbid

Design root

pins

l_dbid

List of pins

type

string

Symbol type can be one of the following: PACKAGE, MECHANICAL, FORMAT, SHAPE, or FLASH

Each Allegro PCB Editor object includes the following types of attributes:

Generic Attributes 

The attributes generic to all the Allegro PCB Editor database objects are listed in the following table. For example, all symbol definition objects have objType set as symbol. Similarly, design objects have objType set as design.

Attribute Name

Attribute Type

Description

objType

objType

Name of the object type

prop

propid

List of attached properties

parentGroups 

l_dbid

List of groups to which the object belongs

readOnly

readOnly

If the value is t, the object cannot be modified. Else, the object is considered read-only.

Figure Attributes 

The common figure attributes are as follows:

Attribute Name

Attribute Type

Description

bBox

bbox

The bounding box of a figure.

 

branch

dbid

The branch parent of an etch figure.

layer

t_layer

The layer of a figure. For a multi-layer object, the value is nil.

parent

dbid

The unconnected owner of a figure.

net

dbid

Net object if the figure is associated with a net.

Object-Specific Attributes 

These are a set of attributes specific to an object. For example, Symdef has two attributes: pins and instances. The pins attribute represents a list of symbol pins. The instances represent a list of symbol instances using that symbol.

Accessing Information from Database Object

Although a database object type can have multiple attributes, learning the semantics of a few attributes can equip you with the ability to draw useful information from the Allegro PCB Editor database. 

Using Access Operator (->)

Use the ->att_name access operator and attribute combination to find the value of attributes of an element, where att_name is any legal attribute for a specific element type. For example, if dbid of a line element is stored in the line_dbid variable, the line_dbid->layer  returns the class or subclass where the line exists. If the attribute does not exist for that object, the function returns nil.

Let’s consider another example:

A Symdef object, mysymdef, can be used as follows:

  • mysymdef->name: To access the name of the symbol definition
  • mysymdef->type: To get the type of symbol, such as package, mechanical, or format

If an attribute does not apply to an object or a property does not exist on the object, the access function returns nil. 

For example, the following function returns nil:

mysymdef->abc

Using Special Attributes ->? And ->??

Special attributes ? (Interrogation mark) and ?? are used to view all the attributes and all the attribute and value pairs of an object, respectively.

 special_attri

special_attri

The following SKILL code shows the attributes of a symbol definition:

SKILL_code

This SKILL code illustrates the following steps:

  1. axlDBGetDesign() extracts the design object, which is assigned to dgnId.
  2. The attribute symdefs of dgnId gets all the symbol definitions in the design.
  3. The first symbol definition is selected.
  4. The attributes of the symbol definition are displayed.

If you try the same code, note that the dbids and firstSymDef differ with designs.

Out-of-Scope Database Id

When a dbid is separated from its object, the dbid is considered out-of-scope. For example, when an object is deleted, or AXL SKILL is closed.  

Evaluating an out-of-scope dbid returns the following message:

dbid: removed

Using an out-of-scope database id in a function causes unexpected results. So, you should set the variable to the id again.

Example of Using Allegro SKILL for Database Objects

Now, let’s understand a simple program to print the reference designator and the XY location of all the components in a design.

design_dbid=axlDBFetDesign()
     l_comp_dbids=design_dbid->components
     foreach(comp_dbid l_comp_dbids
           ref_des=comp_dbid->name
           symbol_dbid=comp_dbid->symbol
           xy_loc=symbol_dbid->xy
           printf("%s \t %L/n" ref_des xy_loc)
     );foreach 

This SKILL code includes the following steps:

  1. axlDBGetDesign(): Gets the design database Id. 
  2. design_dbid->components: Gives a list of components of the design. 
  3. Core SKILL: Iterate all the components using the foreach loop.
  4. Use the name attribute to get RefDes for each component.
  5. Get the symbol associated with the component.
  6. Use attribute xy to get the XY location of the symbol. 

Conclusion

Allegro SKILL database objects are the basic building blocks of the Allegro PCB Editor database. They are essential for viewing design data required to perform any task in the layout design using SKILL routines.

Contact Us

For any feedback or any topics you want us to include in our blogs, write to us at pcbbloggers@cadence.com.

Subscribe to stay updated about our upcoming blogs.

About BoardSurfers

The BoardSurfers series provides solutions to the various tasks related to the creation and management of PCB design using the Allegro platform products. The name and logo of this series are designed to resonate with the vision of making the design and manufacturing tasks enjoyable, just like surfing the waves. Regular, new blog posts by experts cover every aspect of the PCB design process, such as library management, schematic design, constraint management, stack up design, placement, routing, artwork, verification, and more.


CDNS - RequestDemo

Have a question? Need more information?

Contact Us

© 2025 Cadence Design Systems, Inc. All Rights Reserved.

  • Terms of Use
  • Privacy
  • Cookie Policy
  • US Trademarks
  • Do Not Sell or Share My Personal Information