Skip to content

Simba.Data

Simba.Data

Circuit

A Circuit contains devices and connectors

Constructors
Circuit() Empty Circuit Constructor
Circuit(Circuit) Copy Constructor - Duplicate circuit
Properties
Connectors Observable Collection of Connectors
Devices Observable Collection of devices
Name Circuit Name. Used primarly for subcircuits
Methods
AddConnection(int, int, int, int) Add connection between two points. Return None if fail.
AddConnection(int, int, Pin) Add connection between a point and a pin. Return None if fail.
AddConnection(Pin, int, int) Add connection between a pin and a point. Return None if fail.
AddConnection(Pin, Pin) Add connection between two pins.Return None if fail.
AddDevice(string, int, int, int, bool, bool) Add a device instance to the design.
CanAddConnection(int, int, int, int) Check if it is possible to add a connection between two points.
CreateSubsystem(IMovable[]) Replace all the items by a new subcircuit containing them. Try to maintain connections.
FilterMovablesInCurrentCircuit(IEnumerable) Returns only movable items that are currently part of this circuit.
GetConnectorAt(int, int) Return the connector with a connector segment passing through the point. Return None if there is no connector at this location.
GetConnectorConnectedTo(Pin) Return the connector connected to p. return None if the pin is not connected.
GetConnectorsConnectedTo(Device) Return all the connectors connected to a given device.
GetConnectorSegmentsAt(int, int, bool) Returns the list of connector segments where the distance to the point is zero. Return None if none.
GetDeviceByName(string) Return the device with a given name
GetDevicesByLibraryItemName(string) Return a list of devices with a given library name (Ex: "Resistor")
GetPinsConnectedTo(Pin) Return the list of pins connected to this pin through a connector
GetSelectableItemAt(int, int) Return the selectable item (Drawing Elements + Connectors)
GetVariableValue(string) Find the variable of the given name and return its value.
IsConnected(Pin) Return true if the pin is connected to a connector or to another device pin
Remove(Connector) Remove the connector from this circuit.
Remove(IMovable) Remove item from circuit (Device or Connector segment)
Remove(ICollection) Remove a collection of item from the circuit
SaveAsSvg(string) Export the circuit drawing to an SVG file.
SetVariableValue(string, string) Create or find the variable of the given name and assign the value to it.