Sets the shadow style.

syntaxSyntax:
DlxBusStyle.SetStyle(name)
DlxBusStyle.SetStyle(handle)
DlxBusStyle.SetStyle(style)
DlxBusStyle.SetStyle(width, pen, brush)

Parameters

Parameter Description
name A string containing the name of the style.
handle A string containing the handle of the style.
style A DlxBusStyle object from which to copy the style.
width Specifies the width of the line.
pen A DlxPenStyle object or a string containing the name or handle of the outline style.
brush A DlxBrushStyle object or a string containing the name or handle of the background style.

Return Value

If the operation ends correctly, it returns true otherwise it returns false.

Remarks

The style handle is a 27-character alphanumeric string and appears in the box at the bottom of the Style Manager dialog box.

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 busstyle = new DlxBusStyle(1.5, DlxApp.STYLE_NULL, "Blue");
      doc.SetStyle(busstyle);
      layer.DrawBus(new DlxPoint(50,50), new DlxPoint(100,50), true);
      busstyle.SetStyle(DlxApp.STYLE_DEFAULT);
      doc.SetStyle(busstyle);
      layer.DrawBus(new DlxPoint(100,50), new DlxPoint(100,100), true);
    }
  }
}

See also