Public Member Functions | List of all members
CircuitComponentInstance Class Reference

CircuitComponentInstance class is used to specify the position or direction of a component.
The class can be called from Circuit or DynamicCircuit class.
. More...

Public Member Functions

double GetAngle ()
 Returns the angle of the component. More...
 
String GetName ()
 Returns the name of the component as a string. More...
 
PointGetPosition ()
 Returns the position of the component as a Point object. More...
 
String GetType ()
 Returns the type of the component as a string. More...
 
bool IsValid ()
 Returns True if an object is valid. More...
 
void Move (int dx, int dy)
 Moves the circuit component by specifying displacement. More...
 
void MoveTo (int x, int y)
 Moves the circuit component to the specified position. More...
 
void ReverseRotate ()
 Rotates the circuit component by 90 degrees anticlockwise.
 
void Rotate ()
 Rotates the circuit component by 90 degrees clockwise.
 
void RotateTo (double angle)
 Rotates the circuit component by the specified angle. More...
 
void SetComponent (Variant &component)
 Specifies a circuit component. More...
 

Detailed Description

CircuitComponentInstance class is used to specify the position or direction of a component.
The class can be called from Circuit or DynamicCircuit class.
.

Example of obtaining the class object:

app.GetModel(0).GetStudy(0).GetCircuit().GetInstance("Ground", 0)

Member Function Documentation

double CircuitComponentInstance::GetAngle ( )

Returns the angle of the component.

Returns
Angle of the circuit component
String CircuitComponentInstance::GetName ( )

Returns the name of the component as a string.

Returns
Name of the circuit component
Point * CircuitComponentInstance::GetPosition ( )

Returns the position of the component as a Point object.

Returns
Point object
String CircuitComponentInstance::GetType ( )

Returns the type of the component as a string.

Returns
Circuit component type name
bool CircuitComponentInstance::IsValid ( )

Returns True if an object is valid.

Returns
Whether or not the CircuitComponentInstance objects in the list are valid
void CircuitComponentInstance::Move ( int  dx,
int  dy 
)

Moves the circuit component by specifying displacement.

Parameters
dxDisplacement in the X-axis direction
dyDisplacement in the Y-axis direction
void CircuitComponentInstance::MoveTo ( int  x,
int  y 
)

Moves the circuit component to the specified position.

Parameters
xX-coordinate
yY-coordinate
void CircuitComponentInstance::RotateTo ( double  angle)

Rotates the circuit component by the specified angle.

Parameters
angleRotation angle
void CircuitComponentInstance::SetComponent ( Variant &  component)

Specifies a circuit component.

Parameters
componentCircuit component