Skip to content

Device

Represent a device placed on a circuit
Actual devices (Resistor, Inductor...) inherits from this class.

Properties
Circuit Circuit containing the device
Deprecated True if the device is deprecated and should not be used anymore.
Disabled True if the device is disabled.
Disabled devices are not simulated.
Footprint Device Footprint (In the design coordinate system). Takes into account device rotation.
HorizontallyFlipped True if the device is flipped horizontally
InstanceID Device ID. Unique per device.
LibraryItemName Name of the item in the library.
Name Device Name. Ex: D1
The name is set by the Object Namer but can be changed by the user.
Pins List of Device Pins
RotationAngle Angle in degree. clockwise. Use the Move method to move the device.
Scopes List of Device Scopes
UnrotatedHeight Height (In the design coordinate system , when the rotation angle is 0)
UnrotatedLeft Distance to the left (In the design coordinate system) Use the Move method to move the device.
UnrotatedTop Distance to the top (In the design coordinate system) Use the Move method to move the device.
UnrotatedWidth Width (In the design coordinate system, when the rotation angle is 0)
VerticallyFlipped True if the device is flipped vertically
Methods
CanMove(int, int, int, bool, bool, IList) Return true if the emplacement at the newLocation is free.
HorizontalFlip() Flip the device on an horizontal axis
Move(int, int, int, bool, bool) Move the device to the new location.
Does not maintain the current connections
Return false if the device is not moved
RotateLeft() Rotate the device of 90° to the Left
RotateRight() Rotate the device of 90° to the right
SameTypeAndFootprint(Device) Return true if the type and the footprint are equal
SetColors(SignalType) Color the device with the default colors of the given type.
VerticalFlip() Flip the device on a vertical axis