CreateText (Schematic Editor)

Create text

UI Access Draw>Primitive>Text
Parameters
Name Type Description
<TextData> Array

 Array("NAME:TextData" _

"x:=", double, _ // X position of the object

"y:=", double, _ // Y position of the object

"Text:=", string, _ // Text to display

"Color:=", int, // the RBG value of the text color

"Id:=", int), // Id for this item

"ShowRect:=", bool, // true or false, whether to show the highlight rectangle for the text

"X1:=", double, // the text rectangle left X value, in meters

"Y1:=", double, // the text rectangle upper Y value, in meters

"X2:=", double, // the text rectangle right X value, in meters

"Y2:=", double, // the text rectangle lower Y value, in meters

"RectLineWidth:=", double, // the width of the rectangle border, in meters

"RectBordercolor:=", int, // the RBG value of the rectangle border color

"RectFill:=", int, // the rectangle fill pattern id, 0 = hollow, 1 = solid,

2 = NEDiagonal, 3 = OrthoCross, 4 = DiagCross, 5 = NWDiagonal, 6 = Horizontal, 7 = Vertical

"RectColor:=", int, // the RBG value of the rectangle fill color

<Attributes> Array

Array("NAME:Attributes", _

"Page:=", int) _ // [Opt=1] Page number (one-based)

[out,retval] string id)

Return Value String

Unique id

Text is created and the return value has the format: SchObj@<SchematicID>

The Schematic ID can be found in the Properties window on the Symbols tab when you select the text.

 

 

Python Syntax CreateText()
Python Example

oEditor.CreateText(

["NAME:TextData", "X:=", -0.0764183381088826, "Y:=", _

0.040174212034384, "Size:=", 12, "Angle:=",_

0, "Text:=", "Con­trol Circuit", "Color:=", _

0, "Id:=", 34, "ShowRect:=", false, "X1:=", _

-0.0793287547755609, "Y1:=", _

0.0407033787010528, "X2:=", -0.0502245881087778,_

"Y2:=", 0.035411712034365, "RectLineWidth:=", _

0, "RectBorderColor:=", 0, "RectFill:=",

0, "RectColor:=", 0], ["NAME:Attributes", "Page:=", 1])