Database Read Functions

Object Types对象类型

Figure图形

Arcs、Branches、Design Files、DRCs、Lines、Paths、Polygons、Pins、Shapes、Symbols、Tees 、Vias、Pads 、Padstacks、Symdefs

Logical

Components、Functions、Function Pins、Nets

Property dictionary

Parameter objects

Design、Display、Layer Group、Layer、Textblock Group、Textblock

Description描述

虽然一个数据库对象类型可以有几十个属性,但您只需要了解几个属性的语义即可从 Allegro PCB Editor 数据库中获取有用的信息。只要保证被访问的元素的dbid有效,就可以对其进行处理。请求不适用于对象的属性或对象上不存在的属性函数返回nil。

调用 axlShell函数或编辑新的 Allegro PCB Editor 数据库会使所有 dbid 无效。

使用超出范围的 dbid 访问对象的属性会产生不可靠的值。

axlDBRefreshId 函数为任何超出范围的 dbid 返回nil。

修改对象的一个​​属性的 AXL 函数可能会导致该对象的相关属性过期。
当您修改其子属性之一时,父属性可能会过期。

Data Types

AXL 数据库对象可以具有以下数据类型:

TypeMeaning
bboxBoundary box (list of two points, lower left andupper right of a rectangular area that encloses the object)
integerSigned integer number
floatFloating-point number
stringA string. For attributes with a list of possible stringvalues, the attribute description lists the allowed values.
t/nilEither true (t) or false (nil)
dbidAllegro PCB Editor object identifier
l_dbidList of dbids
pointA point–a list of two floats denoting a coordinatepair
l_propidA list of properties accessed byaxlDbGetProperties
l_fillt = solid; nil = polygon; r_fill = crosshatch type

Generic Object Attributes通用对象属性

Attribute NameTypeDescription
objTypestringName of the object type
proppropidAttached properties
parentGroupsl_dbidList of groups to which the object belongs
readOnlyt/nilt = cannot modify object with AXL function

Figure类型

Figure在allegro PCB Editer里面一般被成为几何形状,一个Figure类型的元素通常具有如下的属性。

共同的Figure属性

属性名            类型              描述       
bBox           bbox        Figure’s bounding box        
branch         dbid        For etch, the figure’s branch parent          
layer          t_layer     Layer of figure, nil if object is multi-layer        
parent         dbid        Nonconnective owner            
net            dbid        Net object if figure is associated with a net

注意: 对于所有空(dummy)网络的Figure, 它们的net属性都是””, 而不是nil。

Arc Attributes

Attribute NameTypeDescription
isCirclet/nilt = circle; nil = unclosed arc
isClockwiset/nilt = clockwise; nil = counterclockwise
isEtcht/nilt = a CLINE; nil = a LINE
objTypestringType of object, in this case “arc”.
parentdbidPath, polygon or shape
radiusfloatRadius
startEndl_pointStart and end points of arc
widthfloatWidth of arc
fontint/nilLine font, etch always has nil while 0indicates a solid font.
xypointLocation of arc center

Branch Attributes

Attribute NameTypeDescription
childrenl_dbidList of dbids of the objects that make up branch: paths, tees, vias, pins and shapes
objTypestringType of object, in this case “branch”
parentdbidAlways nil

Design Attributes

使用axlDBGetDesign()获取

Attribute NameTypeDescription
busl_dbidList of busses
compdefsl_dbidList of component definitions
componentsl_dbidList of components
diffpairl_dbidList of differential pairs
drcsl_dbidList of DRCs
drcStatesymbolState of DRC
t = up to date
nil = out-of-date
batch = batch out-of-date
ecsetsl_dbidList of Electrical Csets
groupsl_dbidList of groups
matchgroupl_dbidList of match groups in the design
modulel_dbidList of module instances in the design
netsl_dbid/nilList of nets
netclassl_dbidList of netclass constraints group
netgroupl_dbidList of netgroups in the design
objTypestringType of object, in this case “design”
regionl_dbidList of regions
padstacksl_dbidList of padstacks
pinsl_dbidIf a .dra, list of pins, else nil
symbolsl_dbidList of symbol instances
symdefsl_dbidList of symbol defs
waivedl_dbidList of waived DRCs
xnetl_dbidList of Xnets (no nets with VOLTAGE property)

DRC Attributes

Attribute NameTypeDescription
actualstringActual value (user units)
expectedstringExpected value (user units)
fixedt/nilt = Allegro PCB Editor generated DRC
nil = user defined DRC
namestringName of constraint that was violated
objTypestringType of object, in this case “drc”
parentdbidDesign dbid
sourcestringDRC source (property or constraint set name)
typestringDomain of DRC, values can be:*“NET SPACING CONSTRAINTS”*“PHYSICAL CONSTRAINTS”*“DESIGN”*“NET ELECTRICAL CONSTRAINTS”*“SAME NET CONSTRAINTS”*“EXTERNAL REFERENCE”Weird names are due to evolution of Allegro
violationsl_dbidList of figures causing error (2 max)
waivedt/nilt = waived drc
nil = regular
xypointLocation of DRC marker
   

Group Attributes

Attribute NameTypeDescription
groupMembersl_dbidList of members of the group
namestringName of the group
objTypestringType of object, in this case “group”
typestringPredefined group type.Note: This cannot be defined in SKILL. Userdefined groups are considered “GENERIC.”

Module Attributes

Attribute NameTypeDescription
bBoxbBoxBounding box of all physical members of group
groupMembersl_dbidList of members of the module
namestringName of the module
objTypestringType of object, in this case “group”
typestringMODULE”

Line Attributes

Attribute NameTypeDescription
isEtcht/nilt = a CLINE; nil = a LINE
lineTypes_typea symbol: horizontal, vertical, odd
objTypestringType of object, in this case “line”
parentdbidPath, polygon, or shape
startEndl_pointStart and end points
thermalt/nilCline is a thermal relief.
widthfloatWidth of line
fontint/nilLine font, etch always has nil, while 0indicates a solid font.

Pad Attributes

Attribute NameTypeDescription
bBoxbBoxBounding box. Coordinates are always relative.
figurelr_pathList of r_paths defining pad’s boundarylr_path always contains at most one r_pathnil denotes a null pad
figureNamestringName of pad figure is one of the following:CIRCLE, SQUARE OBLONG, RECTANGLE, SHAPE ornil (if drill only)
flashstringIf of type FLASH, name of flash symbol otherwise an empty string “”(Obsolete; use name attribute)
layerstringPad layer
namestringIf type is a SHAPE or FLASH, name of symbol.
objTypestringType of object, in this case “pad”
offsetl_pointOffset of pad (relative to pin/via origin)
parentdbidPadstack dbid
readOnlytCannot be modified.
typestringPad type is one of: REGULAR, ANTI, or THERMAL

Padstack Attributes

Attribute NameTypeDescription
definitiono_dbid(see isPadRef) Points to padstack definition if this is padReference otherwise nil
drillCharstringdrill characters (max 3)
drillDiameterfloatDrill hole diameter
drillSizeWidthfloatwidth of slot, diameter if hole and extents ofmultidrill
drillSizeHeightfloatheight of slot, diameter if hole and extents ofmultidrill
drillOffsetpointoffset of drill hole
drillFigureNamestringtype of drill symbol (circle, square, and so on.
drillFigureWidthfloatWidth of drill symbol 
(for slots same as drillSizeWidth)
drillFigureHeightfloatHeight of drill symbol 
(for slots same as drillSizeHeight)
drillNonStandardstringType of drill (nil is standard) 
(not supported by slots)
holeTolerancel_floatA list of two numbers reporting the + and – drillhole tolerance.
multiDrillDatal_valuesIf not multidrill then nil otherwise list of:(rows columns clearanceX clearanceYstaggered)Both clearances are in dbreps and staggered is t/nil
holeTypestringType of hole (circle_drill, oval_slot, etc.)
keepoutt/nilPadstack built to accommodate anti-pads asRoute keepouts for mechanical pins. This padstack can also be used for logical connections but this option is ignored.
isPadReft/nilt = padstack is a padstack reference.This means that the actual padstack is a template and the start and end layers of the padstack are dynamically mapped, depending upon its use with a pin or a via.
isThrought/nilt = through padstack
namestringPadstack name
objTypestringType of object, in this case “padstack”
padsll_dbidList of pads
parentdbidDesign
padSuppresiont/nilDoes padstack have Pad Suppression enabled. This is for the legacy artwork based pad suppression.The dynamic pad suppression ignores this option.
platingstringOne of “Plated”, “Non-Plated”, “Plating-Optional”
propnilAlways nil, padstacks do not support properties
startEndlt_layerStart and end layer of padstack
typestringType of padstack; valid values are:throughsmdbbviauvia
uviat/nilA sub-type of bbvias, to differentiate in constraint system.

Path Attributes

Attribute NameTypeDescription
branchdbid/nilBranch owner
hasArcst/nilt = path has one or more arcs
isSameWidtht/nilt = all segments in path have same width
isEtcht/nilt = a CLINE; nil = a LINE
nSegsintegerNumber of segments in path
objTypestringType of object, in this case “path”
parentdbidBranch, symbol, shape or nil
segmentsl_dbidList of arc and line figures in this path
symbolEtchdbidSymbol owner if etch.
startEndlt_layerIf bond-wire start and end layers; 
nil if not bondwire.

Pin Attributes

Attribute NameTypeDescription
branchdbid/nilBranch owner
componentdbid/nilComponent owner of pinnil if unassigned symbol pin
definitiondbid/nilPadstack definitionnil if unplaced component pin
fixedByTestPointt/nilOBSOLETE – kept for backwards compatibility. Use axlDBIsFixed(<dbid>) oraxlDBControl(?testPointFixed) instead.
functionPinsl_dbid/nilList of function pinsnil if unassigned symbol pin
isExplodedt/nilt = pin is instance edited
isMecht/nilt = pin is mechanical
isMirroredt/nilt = pin is mirrored
isThrought/nilt = pin is a throughhole
mirrorTypestringType of mirror.
namestringPadstack name of this pinnil if unplaced component pin
numberstringPin number
objTypestringType of object, in this case “pin”
padsl_dbidUnordered list of pads.1To access a particular pad, use axlDBGetPad.
parentdbiddbid of symbol owning this pin2nil if pin is standalone (as it is in a symbol drawing)
relRotationfloatPin rotation (relative to symbol)
relxypointLocation (relative to symbol)
rotationfloatPin rotation (absolute)
startEndlt_layerRange of layers spanned by pin2
testPointt_layer/nilt_layer, denotes layer of testpoint
nil = pin is not a testpoint
usestringPin use as shown by show element
xypointLocation of pin in absolute coordinates

Polygon Attributes

Attribute NameTypeDescription
areafloatArea of the polygon in drawing units.
bBoxbBoxBounding box.
holeslistList of o_polygons.
isHolet/nilt = polygon is a hole
isRectt/nilt = polygon is a rectangle
nSegsintegerNumber of segments in polygon
objTypestringType of object, in this case “polygon”
parentdbidSymbol, shape (for voids), or nil
segmentsl_dbidPath describing boundary of shape. Boundaryconsists of line and arc segments.
symbolEtchdbidSymbol owner if etch
verticeslistOuter boundary available as a list containing apoint, which is the vertex of a polygon, and a floating point number, which is the radius of the edge from the previous to the present vertex.

Rat_T Attributes

Attribute NameTypeDescription
namestringName of T to T-<n>
netdbidNet of Rat-T
objTypestringType of object, in this case “rat_t”
parentdbidNet
xypointLocation of T

Shape Attributes

Attribute NameTypeDescription
bBoxbBoxBounding box
cavityt/nilIf a boundary shape is for cavity generation(embedded design). Cavity shapes are generated automatically based on the rki.
branchdbid/nilBranch owner
childrenl_dbidUsed when a Boundary Shape points to a list of dynamic shapes
connectl_dbid/nilList of connected figures
fillg_fill/t/nilFill pattern (see axlDBCreateOpenShape ).t = filled; nil = unfilledEach axlFillType has spacing width, origin, and angle.
fillett/nilshape is a fillet (teardrop)
fillOODt/nilDynamic fill is out of date.t = shape needs fill updating 
(Only dynamic shapes can be t)nil = shape does not refill
holeslistList of o_polygons
isHolet/nilt = polygon is a holenil = polygon is not a hole
isRectt/nilt = shape is a rectangle
nSegsintegerNumber of segments in polygon
objTypestringType of object, in this case “shape”
parentdbidBranch (if etch shape), Symbol, shape (for voids)nil = no parent
priorityinteger/nilIf shape is a dynamic shape boundary this is an integer voiding priority. For all other shapes this is nil. The priority is relative to other dynamic shapes on the same layer. If two dynamic shapes are coincident, the shape with the higher priority wins in voiding. This number is re-calculated as needed, so use only for comparison purposes.
regionl_dbid/nilRegion owner if a region shape.
segmentsl_dbidPath boundary of shape
shapeAutol_dbid/nilIf dynamic shape list of generated shapes on the matching auto-gen ETCH or CAVITY layer
shapeBoundarydbid/nilIf this shape is generated from a dynamic shape, this points to that shape.Boundary shapes may either be used for ETCH or CAVITY (see state of cavity attribute)
shapeIsBoundaryt/nilThis shape is a dynamic shape, for example, on BOUNDARY class.
tapert/nilshape is used for tapering
dynamicGroupt/nilIf this a dynamic shape (BOUNDARY class)return its dynamic group object. This is where voiding instance overrides are stored.
symbolEtchdbidSymbol owner, if etch
verticeslistouter boundary available as a list containing apoint (vertex of a polygon) and a floating point number (radius of the edge from the previous to the present vertex).
voidsl_dbidList of polygon boundaries defining voids in this shape

Symbol Attributes

Attribute NameTypeDescription
childrenl_dbid/nilList of figures other than pins making up symbol
componentdbidComponent owner of symbol
definitiondbidSymbol definition
isMirroredt/nilt = symbol is mirrored
mirrorTypestringType of mirror.
namestringSymbol name
objTypestringType of object, in this case “symbol”
parentdbidDesign (no other parent possible for symbols)
pinsl_dbid/nilList of pins
refdesstring/nilReference designator
rotationfloatSymbol rotation
typestringSymbol type is one of: PACKAGE, MECHANICAL,FORMAT, SHAPE or DRAFTING
xypointSymbol location
embeddedt/nilsymbol placed on embedded layer
embeddedLayerstringlayer of placed symbol or nil if external
embeddedMethodstringmethod (CHIP_UP or CHIP_DOWN)
embeddedAttachstringattachment method (DIRECT_ATTACH orINDIRECT_ATTACH)

Symdef (Symbol Definition) Attributes

Attribute NameTypeDescription
childrenl_dbid/nilList of figures other than pins making up shape
instancesl_dbidSymbol instances
namestringName of symbol definition
objTypestringType of object, in this case “symdef”
parentdbidDesign
pinsl_dbid/nilList of pins
typestringSymbol type is one of the following: PACKAGE,MECHANICAL, FORMAT, or SHAPE

Tee Attributes

Attribute NameTypeDescription
branchdbidBranch owner
objTypestringType of object, in this case “tee”
parentdbidBranch
readOnlytUser cannot directly modify
xypointLocation

Text Attributes

Attribute NameTypeDescription
isMirroredt/nilt = text mirrored
justifystring“left”, “right” or “center”
mirrorTypestringType of mirror.
objTypestringType of object, in this case “text”
parentdbidSymbol or nil
rotationfloatRotation angle
textstringThe text itself
textBlockstringText block type
xypointLocation of text origin

Via Attributes

Attribute NameTypeDescription
branchdbid/nilBranch owner
definitiondbidPadstack definition
isMirroredt/nilt = via mirrored
isThrought/nilt = through via
mirrorTypestringType of mirror.
namestringPadstack name
objTypestringType of object, in this case “via”
padsl_dbidUnordered list of pads. 
To access a specific pad, use axlDBGetPad.
parentdbidSymdef or nil
rotationfloatVia rotation
startEndlt_layerStart and end layer of via
testPointt_layer/nilVia test point state is one of: ETCH/TOP orETCH/BOTTOM
xypointLocation of via

Logical类型

Logical类型其实就是和电气有关的属性,比如网络连接(net),电子器件{component)等。 Logical类型通常都具有objType, prop, and readOnly3种属性。 如果你选择了一个component,那么它的objType就是component,如果选择的是pin,则objType属性值就是pin……

在allegro的应用中会根据工作的需要自己定制(创建)属性——用户定义的属性(user defined properties)。Allegro支持用户创建具备如下特性的属性

NETS, COMPONENTS, FUNCTIONS PINS, VIAS, SHAPES, SYMBOLS, CLINES, LINES, DRCS, FIGURES, DESIGNS, COMPDEFS, PINDEFS, FUNCDEFS。

如果你创建了一个只包含SYMBOLS类型的属性,那么你创建的这个属性只能被赋给Allegro中的Symbol对象,而不可以赋给 一个net或其它非Symbol的对象。

Bus Attributes

Attribute NameTypeDescription
groupMembersl_dbidList of xnets of the bus
namestringName of the bus
objTypestringgroup”
typestringBUS”
lockt/nilIs locked for editing (vector buses)

Compdef Attributes

Attribute NameTypeDescription
classstringComponent classification
componentsl_dbidList of component instances of this definition.
deviceTypestringDevice type of the component
functionsl_dbidList of functions.
objTypestringType of object, in this case “compdef”
pinsl_dbidList of pins comprising the component.

Component Attributes

Attribute NameTypeDescription
classstringComponent classification
compdefdbiddbid of component definition (COMPDEF)
deviceTypestringDevice type of component (see COMPDEF)
functionsl_dbidList of functions
namestringReference designator
objTypestringType of object, in this case “component”
packagestringPackage name
pinsl_dbidList of pins comprising component
symboldbid/nildbid of the placed symbol of this component,nil if unplaced

Diffpair Attributes

Attribute NameTypeDescription
groupMembersl_dbidList of xnets of the differential pair
namestringName of the differential pair
objTypestringgroup”
typestringDIFFPAIR”
userDefinedt/nilIf you create t, can be modified. Nil indicates creation by SigNoise models and cannot be changed.

Function Attributes

Attribute NameTypeDescription
namestringFunction designator
objTypestringType of object, in this case “function”
parentdbiddbid of component owning this function
pinsl_dbidList of function pins composing function
slotstringSlot name
typestringFunction type

Function Pin Attributes

Attribute NameTypeDescription
namestringFunction pin name
objTypestringType of object, in this case “functionPin”
parentdbiddbid of function owning this pin
pindbidPin owner of function pin
swap codeintegerSwap code of function pin
usestringPin usage description, one ofUNSPECIFIED, POWER, GROUND, NC,LOADIN, LOADOUT, BI, TRU, OCA, OCL

MATCH_GROUP Attributes

Note: For more information, see axlMatchGroupCreate.

Attribute NameTypeDescription
groupMembersl_dbidList of xnets, nets and pinpairs making up thisgroup.
namestringName of the match group.
objTypestringgroup”
pinpairl_dbidList of pinpairs associated with xnet
typestringMATCH_GROUP”

Net Attributes 

Note:  

1) If net is a member of an xnet then all pinpairs will appear on the xnet.

2) For more information on the rpd attribute see axlMatchGroupCreate

Attribute NameTypeDescription
branchesl_dbidList of branches
namestringNet name
busdbidBus dbid if part of a bus
nBranchesintegerNumber of branches (when exactly one, net is fullyconnected)Note: Island shapes causes the count to be not one, even if all pins are connected.
objTypestringType of object, in this case “net”
pinpairl_dbidList of pinpairs associated with net (1)Note: If a net is a member of an xnet, all pinpairs appear on the xnet.
ratsnestl_dbidList of ratsnest for net.
ratsnest Ont/nilState of ratsnest display for the net.
ratTl_dbidList of rat_T’s. If none exist, this is NULL.
rpdl_rpdList of lists for each member net of a match group (mg_dbidt_relatePropDelay).For more information, see axlMatchGroupCreate
isBundledt/nilt = net contains at least one bundled ratsnest.
scheduleLockedt/nilt = net schedule cannot be changed
unconnectedintegerNumber of remaining connections. This does not includeconnections to unplaced symbols.
unplacedintegerNumber of unplaced pins.

NETCLASS Attributes

Note:  

a.A NetClass can be a member of one or more domains but its name must be unique across all domains.

b.Constraint overrides can be added to netclass via properties.

Attribute NameTypeDescription
groupMembersl_dbidList of nets, xnets, buses or differential pairs.
namestringName of the net class
objTypestring“group”
typestring“NETCLASS”
electricalt/nilIf part of the electrical and same net domain
physicalt/nilIf part of the physical and same net domain
spacingt/nilIf part of the spacing and same net domain

REGION Attribute

Attribute NameTypeDescription
groupMembersl_dbidList of constraint area shapes.
namestringName of the region
objTypestring“group”
typestring“REGION”

CLASS Table Attribute

Note: These are the class-class, class-class-region and class-region constraint table entries. See axlCnsClassTableCreate.

Attribute NameTypeDescription
namestringName of ecset
netclass1dbidnet class entry
netclass2dbidsecond net class entry (may be nil)
regiondbidregion class for table entry (may be nil)
physicaldbidphysical cset associated with entry or nil
spacingstringspacing cset associated with entry or nil
sameNetstringsameNet cset associated with entry or nil
assemblystringphysical assembly cset associated with entry (SIP/APD only)
objTypestring“classTable”
readOnlyt/nilCannot be modified
propl_dbidList of properties on table entry.Typically where constraint overrides on entry exist. Also duplicates the cset names.

Pinpair Attributes 

Note: For nets that are part of an xnet, the pinpair always has the xnet as the pinpair owner. For more information on the rpd attribute, see axlMatchGroupCreate.

Attribute NameTypeDescription
ecsetDerivedt/nilIf t, pinpair was created from an ECset. Nil indicates pinpair created due to net override property.
groupMembersl_dbidList of two pins making up pinpair.
namestringName of the pinpair (<refdes>. <pin#>: <refdes>.<pin#>)
objTypestringgroup”
parentl_dbidNet or xnet owning the pinpair.
parentGroupsl_dbidLists match groups that have this pinpair. May also list other parent groups.
rpdl_rpdFor each match group that has this pinpair as a member, will list as a list of lists. (mg_dbid t_relatePropDelay)
typestringPIN_PAIR”

NET_GROUP Attributes 

Note: Use axlDBCreateGroup family of commands to add, delete and modify these groups.

Attribute NameTypeDescription
groupMembersl_dbidmembers of the group (net_groups, nets, xnets,diffpairs, buses)
namestringName of group
objTypestring“group”
typestring“NET_GROUP”
isInterfaceTopt/nilIf t, group is the top of a definition-driven interface instance.

PORT_GROUP Attributes 

Attribute NameTypeDescription
groupMembersl_dbidmembers of the group (port_groups, pins, functionpins)
namestringName of group
objTypestring“group”
typestring“PORT_GROUP”
isInterfaceTopt/nilIf t, group is the top of a definition-driven interface instance.

RATSNEST Attributes

Attribute NameTypeDescription
bust/nilCurrently being shown with bus routes option
objTypestringType of object, in this case “ratsnest”
pinsConnectedt/nilRatsnest not displayed (both pins on same branch)
pinsl_dbidThe two pins (or ratTs) that the rats connect
pwrAndGndt/nilNet is power and ground scheduled
ratnestt/nilTwo dbids of the next ratsnest for dbid’s of the pins attribute.
ratsPlacedt/nilUser defined rats only, one or more pins unplaced
userDefinedt/nilRatsnest is user defined

XNET Attributes 

Note: 
           1) This attribute can only be defined indirectly from the SigNoise model assignment.
           2) For more information on rpd, see axlMatchGroupCreate.

Attribute NameTypeDescription
busdbidBus dbid if part of a bus.
diffpairdbiddifferential pair dbid if part of a differential pair.
groupMembersl_dbidList of nets of the xnet.
namestringName of the xnet.
objTypestringgroup”
pinpairl_dbidList of pinpairs associated with xnet.
rpdl_rpdFor each match group that has this xnet as a member, lists as a list of lists (mg_dbid t_relatePropDelay).
typestringXNET”.

Parameter类型

Parameter的简单理解就是Allegro中个各个设置参数,举个简单的例子,系统(Design)级别的参数列表。Design Parameter属性

暂略,待补充

最后修改日期: 2022-09-15

作者

留言

你真的厉害,很好的学习资料,谢谢!!!

撰写回覆或留言

发布留言必须填写的电子邮件地址不会公开。

Captcha Code