Click or drag to resize

CurrentDensity Class

CurrentDensity API Class
Inheritance Hierarchy
SystemObject
  ema3d.Api.V25APISimObjectBaseCurrentDensity
    ema3d.Api.V25.Core.ExcitationExcitationBaseCurrentDensity
      ema3d.Api.V25.Core.ExcitationCurrentDensity

Namespace: ema3d.Api.V25.Core.Excitation
Assembly: ema3d.Api.V25 (in ema3d.Api.V25.dll) Version: 0.0.0.0
Syntax
public sealed class CurrentDensity : ExcitationBase<CurrentDensity>

The CurrentDensity type exposes the following members.

Properties
 NameDescription
Public propertyCurrentType Gets / Sets the type of current to use with the source
Public propertyDisplayName Gets/Sets the display name of the underlying sim object.
(Inherited from APISimObjectBaseTWrapper)
Public propertyDocument The document an object exists in.
(Inherited from ExcitationBaseT)
Public propertyGeometry Gets / Sets geometry that the source is attached to
Public propertyIsReversed Gets / Sets if the current direction should be reversed with respect to the line
Public propertySimulation The Simulation an object exists in.
(Inherited from ExcitationBaseT)
Top
Methods
 NameDescription
Public methodStatic memberCreate Gets the current density instance in a document or creates one if it does not exist.
Public methodDelete Deletes sim object.
(Inherited from APISimObjectBaseTWrapper)
Public methodEqualsDetermines whether the specified object is equal to the current object.
(Inherited from Object)
Public methodStatic memberGetAll Retrieve all CurrentDensity objects in the document.
Public methodStatic memberGetByDisplayName Get CurrentDensity by display name
Public methodGetHashCodeServes as the default hash function.
(Inherited from Object)
Public methodGetName Returns the name of the object.
(Inherited from APISimObjectBaseTWrapper)
Public methodGetSiblings Get all objects that share this object's type in the document.
(Overrides APISimObjectBaseTWrapperGetSiblings(Document))
Public methodGetTypeGets the Type of the current instance.
(Inherited from Object)
Public methodSetName Sets the name of the object
(Inherited from APISimObjectBaseTWrapper)
Public methodSetVisibility Sets the visibility status of the object.
(Inherited from APISimObjectBaseTWrapper)
Public methodToStringReturns a string that represents the current object.
(Inherited from Object)
Top
Example
Python
from ema3d.Api.V25.Core.Excitation import CurrentDensity as CurrentDensity
from ema3d.Api.V25.Core.Excitation import CurrentDensityType as CurrentDensityType

# Set Sketch Plane
result = ViewHelper.SetSketchPlane(Plane.PlaneXY)
# Sketch Rectangle
point1 = Point2D.Create(MM(-10),MM(-10))
point2 = Point2D.Create(MM(10),MM(-10))
point3 = Point2D.Create(MM(10),MM(10))
result = SketchRectangle.Create(point1, point2, point3)
# Solidify Sketch
result = ViewHelper.SetViewMode(InteractionMode.Solid)
_face = result.GetCreated[IDesignBody]()[0].Faces[0]

# Create CurrentDensity source
_cd = CurrentDensity.Create(_face)
_cd.DisplayName = "Test Current Density Source"
_cd.CurrentType = CurrentDensityType.Magnetic
See Also