Creates a probe object.
Syntax: |
DlxLayer.DrawProbe(position, name, valueType, plotNumber, analysis, param = "", direction = 60, flags = DlxApp.PROBEFLAGS_DEFAULT)
|
Parameters
Parameter |
Description |
position |
A DlxPoint object with the location to insert the probe. |
name |
The name to assign to the probe. |
valueType |
Specifies the format to be used for complex numbers. You can view module, phase, real or imaginary part, etc. Select from the following:
DlxApp.PROBEVALUETYPE_REAL |
DlxApp.PROBEVALUETYPE_IMAG |
DlxApp.PROBEVALUETYPE_MAG |
DlxApp.PROBEVALUETYPE_DB |
DlxApp.PROBEVALUETYPE_PHDEG |
DlxApp.PROBEVALUETYPE_PHRAD |
DlxApp.PROBEVALUETYPE_DGTSTATE |
DlxApp.PROBEVALUETYPE_DGTSTRENGTH |
|
plotNumber |
Specifies the diagram number. All probe objects to which the same plot number is assigned are placed in the same diagram. Four diagrams are available.
Values from 1 to 4. |
analysis |
Specify the type of analysis in which the probe object is active. Select from the following:
DlxApp.PROBEANALYSIS_ALL |
DlxApp.PROBEANALYSIS_OP |
DlxApp.PROBEANALYSIS_DC |
DlxApp.PROBEANALYSIS_TRAN |
DlxApp.PROBEANALYSIS_AC |
DlxApp.PROBEANALYSIS_NOISE |
DlxApp.PROBEANALYSIS_DISTO |
|
param |
Specify the parameter to be detected. Place the probe on the body of an SPICE component to detect the measurable parameters of the component.
See the list of parameters in the Device instance parameters section of the simulator help. The following values are predefined:
DlxApp.PROBEPARAM_VOLTAGE |
DlxApp.PROBEPARAM_CURRENT |
DlxApp.PROBEPARAM_POWER |
DlxApp.PROBEPARAM_ONOISE |
|
direction |
Specifies the direction of the terminal in degrees.
|
flags |
Specify a combination of the following values:
DlxApp.PROBEFLAGS_DEFAULT |
Default settings. (PROBEFLAGS_SHOWNAME|PROBEFLAGS_UPDATETEXT|PROBEFLAGS_HORIZONTAL) |
DlxApp.PROBEFLAGS_SHOWNAME |
Specifies whether the name should be visible or hidden. |
DlxApp.PROBEFLAGS_VNAME |
Specifies the orientation of the name when the object is placed vertically. |
DlxApp.PROBEFLAGS_HORIZONTAL |
The name is always displayed horizontally. |
DlxApp.PROBEFLAGS_LOADTOGROUND |
If the terminal is flying, it is automatically loaded to ground. |
DlxApp.PROBEFLAGS_UPDATETEXT |
Indicates whether the name of the probe object should be automatically repositioned when the object is rotated. |
|
Return Value
The last newly created DlxProbe object. Call the IsValid() method to determine if the
object was created correctly.
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 probestyle = new DlxProbeStyle(0.5, 15, "blue", "Pin Text");
doc.SetStyle(probestyle);
layer.DrawProbe(new DlxPoint(50,50), "A1", DlxApp.PROBEVALUETYPE_REAL, 1, DlxApp.PROBEANALYSIS_ALL);
}
}
}
|
See also