Constructs a DlxBusentryStyle object.

syntaxSyntax:
new DlxBusentryStyle()
new DlxBusentryStyle(name)
new DlxBusentryStyle(handle)
new DlxBusentryStyle(style)
new DlxBusentryStyle(width, height, length, lineStyle, nameStyle, nameOfsX = 0.5, nameOfsY = 0.1)

Parameters

Parameter Description
name A string containing the name of the style.
handle A string containing the handle of the style.
style A DlxBusentryStyle object from which to copy the style.
width Specify the width of the oblique stroke.
height Specify the height of the oblique stroke.
length Specify the length, i.e. the distance between the end of the oblique stroke and the end point. This value must be calculated so that the end point is centered on the grid.
pen A DlxPenStyle object or a string containing the name or handle of the line style.
nameStyle A DlxTextStyle object or a string containing the name or handle of the text style.
nameOfsX Determines the horizontal position of the name relative to the endpoint.
nameOfsY Determines the vertical position of the name relative to the endpoint.

Remarks

A Bus Entry object is an entry or exit line from the Bus and is characterized by two points. The first point is the anchor point to the bus, while the second is the electrical terminal. The options of this style allow to set the parameters related to the style of the line between these two points and which constitutes the visual representation of the entrance to the Bus.

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