ISch_GraphicalObject interface
The ISch_GraphicalObject interface represents the ancestor interface for an object that has graphical properties on a schematic document.
public interface ISch_GraphicalObject : ISch_BasicContainer
Namespace: SCH · Assembly: Altium.SDK.Interfaces
Inherits: ISch_BasicContainer
Derived: IOpenBus_Port, ISch_Arc, ISch_Circle, ISch_Directive, ISch_HarnessEntry, ISch_Junction, ISch_Label, ISch_Line, ISch_NoERC, ISch_ParametrizedGroup, ISch_Polygon, ISch_Rectangle, ISch_SheetEntry, ISch_Symbol, ISch_Template
Remarks
All graphic objects such as arcs, ports, rectangles etc have bounding rectangles of TCoordRect type.
ISch_BasicContainer interface
ISch_GraphicalObject interface
Properties
| Property | Type | Access | Description |
|---|---|---|---|
| AreaColor | int | get; set | The AreaColor property denotes the filled color region of a closed object. |
| Color | int | get; set | The Color property denotes the color region of a closed object which is usually the border outline. |
| CompilationMasked | bool | get; set | The CompilationMasked property determines whether the object is masked by the Compiler. |
| Dimmed | bool | get; set | This Dimmed property is true when a parent object is not part of the navigation mechanism (Navigator panel). |
| Disabled | bool | get; set | The Disabled property determines whether the object is disabled (due to not being part of the collected objects by the filter mechanism ie the Filter panel) |
| DisplayError | bool | get; set | This property determines whether the DisplayError is displayed or not. |
| EnableDraw | bool | get; set | This property merely determines whether the object can be drawn on the screen or not. |
| ErrorColor | int | get; set | The ErrorColor property determines the error color value that the object is associated with. |
| ErrorKind | TErrorKind | get; set | This property determines the error kind that the object is associated with, when it is subject to the Compiler in Altium Designer. |
| ErrorString | string | get; set | This property returns the Error string that the object is associated with when it is subject to the Compiler in Altium Designer. |
| LiveHighlightValue | string | get; set | This property toggles the highlight value (text string) of the object when it is subject to the probe process in Altium Designer during the Live Design mode. |
| Location | Point | get; set | The Location property defines the reference point of the object (not necessarily the center of the object). |
| OwnerPartDisplayMode | byte | get; set | This property represents schematic components in various graphical representations only. |
| OwnerPartId | int | get; set | The OwnerPartId property determines the child object's parent object's part id. |
| Selection | bool | get; set | This property determines whether the object is selected or not. |
AreaColor
The AreaColor property denotes the filled color region of a closed object.
int GetState_AreaColor();
void SetState_AreaColor(int argColor);
Type: int · Access: read/write
The accessors are extension methods of ISch_GraphicalObjectHelper (using SCH;).
See also: ISch_Port, ISch_Pie, ISch_Rectangle, ISch_RoundRectangle, ISch_TextFrame
Color
The Color property denotes the color region of a closed object which is usually the border outline.
int GetState_Color();
void SetState_Color(int argColor);
Type: int · Access: read/write
The accessors are extension methods of ISch_GraphicalObjectHelper (using SCH;).
The color format is in blue,green,red (b,g,r) primary color format and each primary color has a value of 0 to 255.
CompilationMasked
The CompilationMasked property determines whether the object is masked by the Compiler. The CompileMask object can be placed on a group of objects on the schematic sheet, and these objects have their CompilationMasked property set to true.
bool GetState_CompilationMasked();
void SetState_CompilationMasked(bool argValue);
Type: bool · Access: read/write
Dimmed
This Dimmed property is true when a parent object is not part of the navigation mechanism (Navigator panel). When objects are found by the Navigation mechanism, they stay as is (Dimmed is false), and the objects that are not part of the Navigation are dimmed (Dimmed is true).
bool GetState_Dimmed();
void SetState_Dimmed(bool argB);
Type: bool · Access: read/write
The Disabled / Dimmed states of a parent object (say a component), all its children (pins, lines, etc...) will be also set to this state. Thus when the Disabled/Dimmed property of a child object is being queried, the Disabled/Dimmed state of the parent object will be returned.
Disabled
The Disabled property determines whether the object is disabled (due to not being part of the collected objects by the filter mechanism ie the Filter panel)
bool GetState_Disabled();
void SetState_Disabled(bool argB);
Type: bool · Access: read/write
The Disabled / Dimmed states of a parent object (say a component), all its children (pins, lines, etc...) will be also set to this state. Thus when the Disabled/Dimmed property of a child object is being queried, the Disabled/Dimmed state of the parent object will be returned.
DisplayError
This property determines whether the DisplayError is displayed or not. When true, the red squiggly line underneath the graphical object appears when it is subject to a compilation error in Altium Designer.
bool GetState_DisplayError();
void SetState_DisplayError(bool argValue);
Type: bool · Access: read/write
EnableDraw
This property merely determines whether the object can be drawn on the screen or not.
bool GetState_EnableDraw();
void SetState_EnableDraw(bool argB);
Type: bool · Access: read/write
ErrorColor
The ErrorColor property determines the error color value that the object is associated with.
int GetState_ErrorColor();
void SetState_ErrorColor(int argValue);
Type: int · Access: read/write
The accessors are extension methods of ISch_GraphicalObjectHelper (using SCH;).
ErrorKind
This property determines the error kind that the object is associated with, when it is subject to the Compiler in Altium Designer.
TErrorKind GetState_ErrorKind();
void SetState_ErrorKind(TErrorKind argValue);
Type: TErrorKind · Access: read/write
The accessors are extension methods of ISch_GraphicalObjectHelper (using SCH;).
ErrorString
This property returns the Error string that the object is associated with when it is subject to the Compiler in Altium Designer.
string GetState_ErrorString();
void SetState_ErrorString(string argValue);
Type: string · Access: read/write
LiveHighlightValue
This property toggles the highlight value (text string) of the object when it is subject to the probe process in Altium Designer during the Live Design mode.
string GetState_LiveHighlightValue();
void SetState_LiveHighlightValue(string argValue);
Type: string · Access: read/write
Location
The Location property defines the reference point of the object (not necessarily the center of the object). Use the BoundingRectangle and BoundingRectangle_Full methods to determine the bounding regions of the object.
Point GetState_Location();
void SetState_Location(Point argLocation);
Type: Point · Access: read/write
The accessors are extension methods of ISch_GraphicalObjectHelper (using SCH;).
See also: ISch_GraphicalObject.BoundingRectangle, ISch_GraphicalObject.BoundingRectangle_Full
Examples: Ciiva
OwnerPartDisplayMode
This property represents schematic components in various graphical representations only. A schematic component can have up to 255 different graphical representations and a component can be composed of different parts that make up the whole. A child object is part of the parent object and thus the child object's owner part display mode fetches the parent's (in this case the component) part display mode.
byte GetState_OwnerPartDisplayMode();
void SetState_OwnerPartDisplayMode(byte argValue);
Type: byte · Access: read/write
See also: ISch_Component
Examples: Extension_CreateSchComponent
OwnerPartId
The OwnerPartId property determines the child object's parent object's part id. A component can be composed of multiple parts. Each part is composed of schematic primitives and thus each primitive associated with the part can be queried for its OwnerPartId property. The owner of the child object is the parent object.
int GetState_OwnerPartId();
void SetState_OwnerPartId(int argValue);
Type: int · Access: read/write
Examples: Extension_CreateSchComponent
Selection
This property determines whether the object is selected or not. When an object is selected, a crossed line boundary appears around the object. This object can then be moved or edited graphically.
bool GetState_Selection();
void SetState_Selection(bool argB);
Type: bool · Access: read/write
Methods
| Method | Returns | Description |
|---|---|---|
| AddErrorString | void | This method adds an error string to the string whether it is at end or not. |
| BoundingRectangle | CoordRect | This method returns the coordinates of the bounds of the parent object itself (not including the children objects if any). |
| BoundingRectangle_Full | CoordRect | This method returns the coordinates of the bounds of the parent object itself and including the children objects if any.. |
| GetHash | string | |
| GraphicallyInvalidate | void | This method when invoked invalidates the object graphically prompting the system to do a system re-draw to refresh the screen. |
| Mirror | void | The Mirror method flips the object across the axis (TLocaiton Type) |
| MoveByXY | void | This MoveByXY method moves the object in a linear distance specified by the X,Y coordinates relative to the reference point of the object. |
| MoveToXY | void | This MoveToXY method moves the object to a new location specified by the X,Y coordinates. |
| ResetErrorFields | void | This method resets the error fields of the object. |
| RotateBy90 | void | The RotateBy90 method forces the rotation of the object by its center or a defined location on the schematic sheet and the rotation is done in 90 degree increments (0, 90, 180, 270). |
| SetState_xSizeySize | void | This method sets the X size and the ySize of the graphical bounds of the object. |
AddErrorString
This method adds an error string to the string whether it is at end or not.
void AddErrorString(string argErrorString, bool argtEnd);
| Parameter | Type | Passing |
|---|---|---|
argErrorString | string | value |
argtEnd | bool | value |
Returns: nothing (void)
BoundingRectangle
This method returns the coordinates of the bounds of the parent object itself (not including the children objects if any). To determine the full bounding rectangle of the object (including the children object), invoke the BoundingRectangle_Full method instead.
CoordRect BoundingRectangle();
Returns: CoordRect
Extension method of ISch_GraphicalObjectHelper (using SCH;).
For example a Schematic component would typically have a rectangle as the outline, the pins and parameters as the children objects.
See also: ISch_GraphicalObject.BoundingRectangle_Full
BoundingRectangle_Full
This method returns the coordinates of the bounds of the parent object itself and including the children objects if any.. To determine the bounding rectangle of the parent object (excluding the children object), invoke the BoundingRectangle method instead.
CoordRect BoundingRectangle_Full();
Returns: CoordRect
Extension method of ISch_GraphicalObjectHelper (using SCH;).
For example a Schematic component would typically have a rectangle as the outline, the pins and parameters as the children objects.
See also: ISch_GraphicalObject.BoundingRectangle
GetHash
No description yet.
string GetHash();
Returns: string
GraphicallyInvalidate
This method when invoked invalidates the object graphically prompting the system to do a system re-draw to refresh the screen.
void GraphicallyInvalidate();
Returns: nothing (void)
Examples: Extension_CreateSchComponent, Extension_ModifySchWireColor
Mirror
The Mirror method flips the object across the axis (TLocaiton Type)
void Mirror(Point argxis);
void Mirror(IPoint argxis);
| Parameter | Type | Passing |
|---|---|---|
argxis | Point | value |
Returns: nothing (void)
The first overload is an extension method of ISch_GraphicalObjectHelper (using SCH;) with typed parameters; the second is declared by the interface.
See also: ISch_Label, ISch_Component
MoveByXY
This MoveByXY method moves the object in a linear distance specified by the X,Y coordinates relative to the reference point of the object.
void MoveByXY(int argx, int argy);
| Parameter | Type | Passing |
|---|---|---|
argx | int | value |
argy | int | value |
Returns: nothing (void)
MoveToXY
This MoveToXY method moves the object to a new location specified by the X,Y coordinates.
void MoveToXY(int argx, int argy);
| Parameter | Type | Passing |
|---|---|---|
argx | int | value |
argy | int | value |
Returns: nothing (void)
Examples: Extension_CreateSchComponent
ResetErrorFields
This method resets the error fields of the object.
void ResetErrorFields();
Returns: nothing (void)
RotateBy90
The RotateBy90 method forces the rotation of the object by its center or a defined location on the schematic sheet and the rotation is done in 90 degree increments (0, 90, 180, 270).
void RotateBy90(Point argCenter, TRotationBy90 arg);
void RotateBy90(IPoint argCenter, int arg);
| Parameter | Type | Passing |
|---|---|---|
argCenter | Point | value |
arg | TRotationBy90 | value |
Returns: nothing (void)
The first overload is an extension method of ISch_GraphicalObjectHelper (using SCH;) with typed parameters; the second is declared by the interface.
See also: TRotationBy90
SetState_xSizeySize
This method sets the X size and the ySize of the graphical bounds of the object.
void SetState_xSizeySize();
Returns: nothing (void)
Inherited members
- 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
Returned by
IOpenBus_Port.SchOwner, ISch_HitTest.HitObject
Accepted by
IDocumentPainterView.PaintSingleObject, IDocumentPainterView.Redraw