Adds a new pin to the electrical symbol.

syntaxSyntax:
DlxLayer.DrawPin(point, pinLength, rotation, number, name, label, type, style, flags = DlxApp.PINFLAGS_DEFAULTS, ieeeInside = 0, ieeeInEdge = 0, ieeeOutEdge = 0, ieeeOutside = 0)

Parameters

Parameter Description
point A DlxPoint object with the location to insert the pin.
pinLength Specify the pin length.
rotation Specify the rotation in degrees.
number The number to assign to the pin.
name The name to assign to the pin.
label The label to assign to the pin. The label assigned to a pin is displayed instead of the pin name when the pin name is set to invisible. Assign a value to the pin label only if the name to be displayed on the symbol is different from the actual name of the pin: for example in IEEE symbols.
type The electrical characteristics of the pin. The electric type is used during the compilation of the electrical schematic and the ERC. Select from the following:
DlxApp.PINTYPE_UNDEFINED Pin with function not clearly defined.
DlxApp.PINTYPE_INPUT Input pin.
DlxApp.PINTYPE_OUTPUT Output pin.
DlxApp.PINTYPE_BIDIRECTIONAL Input/Output pin.
DlxApp.PINTYPE_POWER Power supply pins of a component (Vcc, Vss, Gnd).
DlxApp.PINTYPE_POWEROUTPUT Pin giving power as the output pin of voltage regulator.
DlxApp.PINTYPE_PASSIVE Pin of a passive element (resistor, capacitor ecc.).
DlxApp.PINTYPE_THREESTATE Output pin, which can achieve high-impedance.
DlxApp.PINTYPE_OPENCOLLECTOR Open collector pin.
DlxApp.PINTYPE_OPENEMITTER Open emitter pin.
style A DlxPinStyle object with the style of the pin.
flags Specify a combination of the following values:
DlxApp.PINFLAGS_DEFAULTS PINFLAGS_SHOWLINE|PINFLAGS_SHOWNUM|PINFLAGS_VNUM|PINFLAGS_SHOWNAME|PINFLAGS_VNAME|PINFLAGS_UPDATETEXT
DlxApp.PINFLAGS_UNCONNECTED When this option is enabled, it is specified that the pin is not electrically connected and should be ignored during the ERC.
DlxApp.PINFLAGS_SWAPPOSITION Allows you to exchange number and name positions.
DlxApp.PINFLAGS_HIDDEN In some components, such as those belonging to logical families, power supply pins may be hidden. Enabling this option specifies that the pin is hidden. When the netlist is created, all hidden pins are automatically connected to other hidden pins with the same name and to connections with the same name. This option only takes effect if the pin is included in a symbol. Free pins on a symbol definition page are always visible.
DlxApp.PINFLAGS_SHOWLINE When this option is enabled, the line connecting the two characteristic points of a pin is visible.
DlxApp.PINFLAGS_UPDATETEXT Indicates whether the name and pin number should be repositioned automatically when the pin is rotated.
DlxApp.PINFLAGS_SHOWNUM Determines whether the pin number is visible.
DlxApp.PINFLAGS_VNUM Specifies the orientation of the number when the pin is placed vertically.
DlxApp.PINFLAGS_SHOWNAME Determines whether the pin name is visible.
DlxApp.PINFLAGS_VNAME Specifies the orientation of the name when the pin is placed vertically.
DlxApp.PINFLAGS_BUS A pin with bus functionality represents a group of pins with a single graphic symbol. This type of pin allows the creation of simplified symbols in which all the pins corresponding to data or address lines are represented with a single pin.
DlxApp.PINFLAGS_MULTIPLE A multiple pin represents with a single graphic symbol a group of pins with the same electrical function. For example, some components have multiple ground line terminals (gnd) that are internally short-circuited.
DlxApp.PINFLAGS_GRAPHIXONLY If this option is active, the pin will be created without electrical functionality. A non-electric pin is only a graphic object and must be used when the symbol requires the presence of some pins for representative purposes only.
DlxApp.PINFLAGS_SHOWONLYFIRST When this option is enabled for a Multiple or Bus pin, only the first pin number is shown instead of showing all pin numbers.
DlxApp.PINFLAGS_IGNOREIFHIDDEN The pin is ignored if this option is enabled and the pin is hidden.
DlxApp.PINFLAGS_NOERC When this option is enabled, it is specified that the pin should be ignored during the ERC.
ieeeInside Specify the symbol to be added internally to the component's graphic symbol.
DlxApp.IEEESYMBOLINSIDE_NONE
DlxApp.IEEESYMBOLINSIDE_OPEN
DlxApp.IEEESYMBOLINSIDE_OPENHIGH
DlxApp.IEEESYMBOLINSIDE_OPENLOW
DlxApp.IEEESYMBOLINSIDE_PASSIVEUP
DlxApp.IEEESYMBOLINSIDE_PASSIVEDW
DlxApp.IEEESYMBOLINSIDE_THREESTATE
DlxApp.IEEESYMBOLINSIDE_AMPLIFIER
DlxApp.IEEESYMBOLINSIDE_GENERATOR
DlxApp.IEEESYMBOLINSIDE_HYSTERESIS
DlxApp.IEEESYMBOLINSIDE_POSTPONED
DlxApp.IEEESYMBOLINSIDE_SHIFT
ieeeInEdge Specify the symbol to be added on the inside edge of the component graphic symbol.
DlxApp.IEEESYMBOLINSIDEEDGE_NONE
DlxApp.IEEESYMBOLINSIDEEDGE_CLOCK
ieeeOutEdge Specify the symbol to add to the outer edge of the component graphic symbol.
DlxApp.IEEESYMBOLOUTSIDEEDGE_NONE
DlxApp.IEEESYMBOLOUTSIDEEDGE_DOT
DlxApp.IEEESYMBOLOUTSIDEEDGE_LOWIN
DlxApp.IEEESYMBOLOUTSIDEEDGE_LOWOUT
ieeeOutside Specify the symbol to add outside the component graphic symbol.
DlxApp.IEEESYMBOLOUTSIDE_NONE
DlxApp.IEEESYMBOLOUTSIDE_FLOWIN
DlxApp.IEEESYMBOLOUTSIDE_FLOWOUT
DlxApp.IEEESYMBOLOUTSIDE_FLOWBI
DlxApp.IEEESYMBOLOUTSIDE_ANALOG
DlxApp.IEEESYMBOLOUTSIDE_DIGITAL
DlxApp.IEEESYMBOLOUTSIDE_NONLOGIC

Return Value

The newly created DlxPin object. Call the IsValid() method to determine if the object was created correctly.

Remarks

The pins define the connection points for the input and output signals from an electrical symbol.

Name, Number and Label

The label assigned to a pin is displayed instead of the pin name when the pin name is set to invisible. Assign a value to the pin label only if the name to be displayed on the symbol is different from the actual name of the pin: for example in IEEE symbols.

Single Pin

Specify the number, name and, if applicable, the label of the pin.

Pin of a Multi-Part Component

Multipart components are those components that contain several equal parts represented by the same symbol. For example, the 74LS00 component is a multi-part component because it contains four two-input NAND ports. For this type of component can be used as a symbol the NAND port where for each pin you must specify, separating them with commas, the numbers and names that the pin assumes for each part.

For example, for component 74LS00:

in the Number field you must indicate: (1,4,9,12) for input A, (2,5,10,13) for input B and (3,6,8,11) for output Y
in the Name field you must indicate: (1A,2A,3A,4A) for input A, (1B,2B,3B,4B) for input B and (1Y,2Y,3Y,4Y) for output Y

Pin with bus functionality

A pin with bus functionality represents a group of pins with a single graphic symbol. This type of pin allows you to create simplified symbols in which all pins corresponding to data or address lines are represented with a single pin. To specify that a pin has Bus functionality you must tick the option As Bus.

In the Number field you must specify, separating them with commas, the numbers of all the pins belonging to the bus and in the Name field you must report, in the same order, the names.

For example, for component 27C64:

in field number you must indicate: 11,12,13,15,16,17,18,19
in the number field you must indicate: D0,D1,D2,D3,D4,D5,D6,D7

Multiple pins

A multiple pin represents with a single graphic symbol a group of pins with the same electrical function and the same name. For example, some components have multiple ground line terminals (GND) that are internally short-circuited. To specify a multiple pin, check the Multiple pin option.

In the Number field you have to specify, separating them with commas, the numbers of all the pins and in the Name field you have to specify the name.

Overlined names

To insert overlined characters, enclose them between two occurrences of the pipe character '|'. Ex: P1/|P2|

Symbols

Symbols added to the pin allow you to show the electrical characteristics of the pin. These symbols are purely graphic. The electrical characteristics of the pin are determined only by the Electrical Type parameter.

Example

  Copy codeCopy code
var prj = DlxApp.GetJob().GetProject("Example Sch");
if (!prj.IsValid())
  prj = DlxApp.GetJob().NewProject("Example Sch");
var doc = prj.GetDocument("Examples Sch", DlxApp.DOCTYPE_SCHEMATIC);
if (!doc.IsValid())
{
  doc = prj.NewDocument("Examples Sch", DlxApp.DOCTYPE_SCHEMATIC);
  doc.SetPageFormat("A4", false);
}
if (doc.IsValid() && doc.Activate())
{
  var page = doc.GetActivePage();
  if (page.IsValid())
  {
    var layer = page.GetLayerFromType(DlxApp.LAYERTYPE_DRAWING);
    if (layer.IsValid())
    {
      var pinstyle = new DlxPinStyle(DlxApp.PINSTYLE_LINE);
      layer.DrawPin(new DlxPoint(80, 100), 5, 0, "1", "P1/|P2|", "", DlxApp.PINTYPE_PASSIVE, pinstyle);
    }
  }
}

See also