Adds a new pin to the electrical symbol.
Syntax: |
---|
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:
|
||||||||||||||||||||||||||||||||
style | A DlxPinStyle object with the style of the pin. | ||||||||||||||||||||||||||||||||
flags | Specify a combination of the following values:
|
||||||||||||||||||||||||||||||||
ieeeInside | Specify the symbol to be added internally to the component's graphic symbol.
|
||||||||||||||||||||||||||||||||
ieeeInEdge | Specify the symbol to be added on the inside edge of the component graphic symbol.
|
||||||||||||||||||||||||||||||||
ieeeOutEdge | Specify the symbol to add to the outer edge of the component graphic symbol.
|
||||||||||||||||||||||||||||||||
ieeeOutside | Specify the symbol to add outside the component graphic symbol.
|
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 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);
}
}
}
|