Returns the style type.

syntaxSyntax:
DlxStyle.GetType()

Return Value

Returns one of the following values:

DlxApp.STYLETYPE_UNKNOWN
DlxApp.STYLETYPE_COLOR
DlxApp.STYLETYPE_PEN
DlxApp.STYLETYPE_DASH
DlxApp.STYLETYPE_BRUSH
DlxApp.STYLETYPE_HATCH
DlxApp.STYLETYPE_FONT
DlxApp.STYLETYPE_TEXT
DlxApp.STYLETYPE_SHADOW
DlxApp.STYLETYPE_DIMENSION
DlxApp.STYLETYPE_LEADER
DlxApp.STYLETYPE_FRAME
DlxApp.STYLETYPE_PIN
DlxApp.STYLETYPE_BUS
DlxApp.STYLETYPE_BUSENTRY
DlxApp.STYLETYPE_PROBE
DlxApp.STYLETYPE_DIAGRAM
DlxApp.STYLETYPE_PAD
DlxApp.STYLETYPE_TRACK

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 style = new DlxPenStyle();
      doc.GetStyle(style);
      DlxApp.Printf("Current pen style: %s - %s (%i)", style.GetName(), style.GetHandle(), style.GetType());
    }
  }
}

See also