ISch_Line interface
Lines are graphical drawing objects with any number of joined segments. A line object is represented by the ISch_Line interface.
public interface ISch_Line : ISch_GraphicalObject
Namespace: SCH · Assembly: Altium.SDK.Interfaces
Inherits: ISch_BasicContainer → ISch_GraphicalObject
Derived: ISch_BusEntry
Example
Create a new schematic document and place a line on it.
using DXP;
using EDP;
using SCH;
// Generate a blank schematic document.
var workspace = DXP.GlobalVars.Client.GetDXPWorkspace() as EDP.IWorkspace;
if (workspace == null)
return;
workspace.DM_CreateNewDocument("SCH");
// Check if the schematic editor is active.
ISch_ServerInterface schServer = SCH.GlobalVars.SchServer;
if (schServer == null)
return;
ISch_Document schDoc = schServer.GetCurrentSchDocument();
if (schDoc == null)
return;
// Create a new line and place it on the document.
var schLine = schServer.SchObjectFactory(TObjectId.eLine, TObjectCreationMode.eCreate_GlobalCopy) as ISch_Line;
if (schLine == null)
return;
schLine.SetState_Location(new DXP.Point(new SPoint { X = 180, Y = 200 }));
schLine.SetState_Corner(new DXP.Point(new SPoint { X = 180, Y = 400 }));
schLine.SetState_LineWidth(TSize.eMedium);
schLine.SetState_LineStyle(TLineStyle.eLineStyleSolid);
schLine.SetState_Color(0xFF00FF);
schDoc.RegisterSchObjectInContainer(schLine);
Properties
| Property | Type | Access | Description |
|---|---|---|---|
| Corner | Point | get; set | |
| LineStyle | TLineStyle | get; set | |
| LineWidth | TSize | get; set | The LineWidth property defines the border width of the line with one of the following values from the TSize enumerated type. |
Corner
No description yet.
Point GetState_Corner();
void SetState_Corner(Point argLocation);
Type: Point · Access: read/write
The accessors are extension methods of ISch_LineHelper (using SCH;).
LineStyle
No description yet.
TLineStyle GetState_LineStyle();
void SetState_LineStyle(TLineStyle argStyle);
Type: TLineStyle · Access: read/write
The accessors are extension methods of ISch_LineHelper (using SCH;).
LineWidth
The LineWidth property defines the border width of the line with one of the following values from the TSize enumerated type.
TSize GetState_LineWidth();
void SetState_LineWidth(TSize argSize);
Type: TSize · Access: read/write
The accessors are extension methods of ISch_LineHelper (using SCH;).
Inherited members
- From ISch_GraphicalObject: AddErrorString, AreaColor, BoundingRectangle, BoundingRectangle_Full, Color, CompilationMasked, Dimmed, Disabled, DisplayError, EnableDraw, ErrorColor, ErrorKind, ErrorString, GetHash, GraphicallyInvalidate, LiveHighlightValue, Location, Mirror, MoveByXY, MoveToXY, OwnerPartDisplayMode, OwnerPartId, ResetErrorFields, RotateBy90, Selection, SetState_xSizeySize
- From ISch_BasicContainer: AddAndPositionSchObject, AddSchObject, CopyTo, DeleteAll, DescriptionString, ExportToParameters, FreeAllContainedObjects, Handle, IdentifierString, Import_FromUser, ObjectId, OwnerSchDocument, RemoveSchObject, Replicate, SchBasicContainer, SchIterator_Create, SchIterator_Destroy, SchParameterByName, Setstate_Default, Text, UniqueId, WiringDiagramOriginUniqueId