Switch Class |
The Switch type exposes the following members.
| Name | Description | |
|---|---|---|
| ActivationTime | Gets/Sets the switch's Activation Time (in seconds). | |
| DeactivationTime | Gets/Sets the switch's Deactivation Time (in seconds). | |
| DisplayColor | Gets/Sets the switch's Display Color. | |
| DisplayName |
Gets/Sets the switch's Display Name.
(Overrides APISimObjectBaseTWrapperDisplayName) | |
| Geometry | Gets/Sets the Switch's Geometry. | |
| Type | Gets/Sets the switch's Type option (On/Off/Dual). |
| Name | Description | |
|---|---|---|
| Create | Create a new switch. | |
| Delete |
Deletes sim object.
(Inherited from APISimObjectBaseTWrapper) | |
| Equals | Determines whether the specified object is equal to the current object. (Inherited from Object) | |
| GetAll | Retrieve all Switch objects in the document. | |
| GetHashCode | Serves as the default hash function. (Inherited from Object) | |
| GetName |
Returns the name of the object.
(Inherited from APISimObjectBaseTWrapper) | |
| GetSiblings |
Get all objects of this type in a document.
(Overrides APISimObjectBaseTWrapperGetSiblings(Document)) | |
| GetType | Gets the Type of the current instance. (Inherited from Object) | |
| SetName |
Sets the name of the object
(Inherited from APISimObjectBaseTWrapper) | |
| SetVisibility |
Sets the visibility status of the object.
(Inherited from APISimObjectBaseTWrapper) | |
| ToString | Returns a string that represents the current object. (Inherited from Object) |
from ema3d.Api.V26.Cabling.Elements import Switch as Switch from ema3d.Api.V26.Cabling.Elements import SwitchType as SwitchType # Use the Air ESD Gun demo part I initial file. # In the script editor, click on the drop-down menu next to the mouse cursor icon with the green plus sign and select “Index”. switch1 = Switch.Create(GetRootPart().Components[1].Content.Curves[5]) switch1.DisplayName = "Sw 1" switch1.Type = SwitchType.Off switch1.DeactivationTime = 2E-8 switch1.ActivationTime = 1e-8 switch1.DisplayColor = Color.Gold