Creates bus input terminal.

syntaxSyntax:
DlxLayer.DrawBusentry(position, name, direction, flags = DlxApp.BUSENTRYFLAGS_DEFAULT)

Parameters

Parameter Description
position A DlxPoint object with the location to insert the pin.
name The name to assign to the pin.
direction Specifies the direction of the terminal. Select from the following:
DlxApp.BUSENTRYDIR_BOTTOMRIGHT
DlxApp.BUSENTRYDIR_RIGHTTOP
DlxApp.BUSENTRYDIR_TOPLEFT
DlxApp.BUSENTRYDIR_LEFTBOTTOM
DlxApp.BUSENTRYDIR_TOPRIGHT
DlxApp.BUSENTRYDIR_LEFTTOP
DlxApp.BUSENTRYDIR_BOTTOMLEFT
DlxApp.BUSENTRYDIR_RIGHTBOTTOM
flags Specify a combination of the following values:
DlxApp.BUSENTRYFLAGS_DEFAULT Default settings. (BUSENTRYFLAGS_SHOWNAME|BUSENTRYFLAGS_VNAME|BUSENTRYFLAGS_UPDATETEXT)
DlxApp.BUSENTRYFLAGS_SHOWNAME Determines whether the pin name is visible.
DlxApp.BUSENTRYFLAGS_VNAME Specifies the orientation of the name when the pin is placed vertically.
DlxApp.BUSENTRYFLAGS_UPDATETEXT Indicates whether the name should be repositioned automatically when the pin is rotated.

Return Value

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

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 bestyle = new DlxBusentryStyle(5, 5, 5, new DlxPenStyle(0.2, "red"), "Pin Text", 0.5, 0.1);
      doc.SetStyle(bestyle);
      layer.DrawBusentry(new DlxPoint(100,120), "red", DlxApp.BUSENTRYDIR_BOTTOMRIGHT);
      bestyle.SetStyle(5, 5, 5, new DlxPenStyle(0.2, "green"), "Pin Text", 0.5, 0.1);
      doc.SetStyle(bestyle);
      layer.DrawBusentry(new DlxPoint(100,115), "green", DlxApp.BUSENTRYDIR_BOTTOMRIGHT);
      bestyle.SetStyle(5, 5, 5, new DlxPenStyle(0.2, "blue"), "Pin Text", 0.5, 0.1);
      doc.SetStyle(bestyle);
      layer.DrawBusentry(new DlxPoint(100,110), "blue", DlxApp.BUSENTRYDIR_BOTTOMRIGHT);

      var busstyle = new DlxBusStyle(1.5, DlxApp.STYLE_NULL, "darkblue");
      doc.SetStyle(busstyle);
      layer.DrawBus(new DlxPoint(50,50), new DlxPoint(100,50), true);
      layer.DrawBus(new DlxPoint(100,50), new DlxPoint(100,150), true);
    }
  }
}

See also