Class: Global

Global

Top-level global for the API

Members

(non-null) components :Array.<up.api.core.Component>

An array of the component instances in the design.
Type:

ctx_ :up.api.Context|up.api.ComponentContext

@private
Type:
Inherited From:

designId :string

The design id.
Type:
  • string

designOwner :string

The design owner.
Type:
  • string

isFootprint :boolean

Type:
  • boolean
Inherited From:

isPadstack :boolean

Type:
  • boolean
Inherited From:

isPlatedThroughHole :boolean

Type:
  • boolean
Inherited From:

isPour :boolean

Type:
  • boolean
Inherited From:

(non-null) issues :up.api.issue.Issues

Access to schematic-specific api objects.
Type:

isTrace :boolean

Type:
  • boolean
Inherited From:

isVia :boolean

Type:
  • boolean
Inherited From:

(non-null) localUser :up.api.common.User

Type:

message :function

The up.api.common.Message class: used for its static methods.ie: api.message.warning('foo');
Type:
  • function

(non-null) modules :Array.<up.api.core.Module>

An array of the module instances in the design.
Type:

(non-null) nets :Array.<up.api.core.Net>

An array of all of the nets in the design.
Type:

(non-null) parts :Array.<up.api.core.Part>

An array of the parts in ths design.
Type:

(non-null) pcb :up.api.pcb.PCB

Access to pcb-specific api objects.
Type:

(non-null) sketch :up.api.sketch.Sketch

Access to schematic-specific api objects.
Type:

(non-null) tool :up.api.Tool

Access to the tool.
Type:

tutorialPane :up.sketch.TutorialPane

Type:
  • up.sketch.TutorialPane

(non-null) violations :Array.<up.api.rule.Violation>

An array of the current design rule violations for the design.
Type:

Methods

(static) create(workspacenon-null, opt_usedInTransactionopt) → (non-null) {up.api.Global}

Parameters:
Name Type Attributes Description
workspace up.workspace.Workspace
opt_usedInTransaction boolean <optional>
Whether or not use of the API is enclosed within a transaction.
Returns:
A new API proxy with a new context.
Type
up.api.Global

closeCheckAndCall(toCall) → {function}

Parameters:
Name Type Description
toCall function
Inherited From:
Returns:
Type
function

defineGetAndSetFunctions(propertyName, getFunction, setFunction)

Parameters:
Name Type Description
propertyName string
getFunction function
setFunction function
Inherited From:

defineGetFunction(propertyName, getFunction)

Parameters:
Name Type Description
propertyName string
getFunction function
Inherited From:

getNet(netNamenon-null) → (non-null) {up.api.core.Net}

Parameters:
Name Type Description
netName up.design.NetName The name of the net to lookup. (case sensitive).
Returns:
The net. An empty net is returned if it does not exist.
Type
up.api.core.Net

isNet(netName) → {boolean}

Returns true <=> the object is in the provided net.
Parameters:
Name Type Description
netName string
Inherited From:
Returns:
Type
boolean

isValid()

onLayer(layer) → {boolean}

Returns true <=> the pcb object is on the provided layer. Default False for proxyobjects.
Parameters:
Name Type Description
layer string
Inherited From:
Returns:
Type
boolean

refresh()

Force un-cache of memoized api values.