Академический Документы
Профессиональный Документы
Культура Документы
Version 9.2
March 2012
Table of Contents 3
Table of Contents
CHAPTER 1 ............................................................................................ 21
INTRODUCTION TO SCRIPTING/PROGRAMMING .............................. 21
Case: ................................................................................................. 30
Abbreviations: .................................................................................. 30
CATEGORY ............................................................................................. 30
ACTION .................................................................................................. 31
SELECTIONTYPE / DATAFORM.................................................................. 32
4 INTEGRATED API Guide
CHAPTER 3 ............................................................................................. 33
THE INTEGRATED API FUNCTION LIST............................................... 33
FILE ....................................................................................................... 33
ExportImage_AsBMP ....................................................................... 33
ExportImage_AsGIF ......................................................................... 33
ExportImage_AsJPG ........................................................................ 34
ExportImage_AsPNG ....................................................................... 34
Open .................................................................................................. 35
Save ................................................................................................... 35
Save2DElectricStreamlines ............................................................. 35
SaveStreamlines .............................................................................. 36
GEOMETRY ............................................................................................. 37
AngularCopy..................................................................................... 37
AngularCopy_AboutXaxis ............................................................... 38
AngularCopy_AboutYaxis ............................................................... 39
AngularCopy_AboutZaxis ............................................................... 39
CreateLine......................................................................................... 40
CreateArc_By3points ....................................................................... 40
CreateCube ....................................................................................... 41
CreateSphere_ByCenterRadius ...................................................... 41
CreateSpline ..................................................................................... 42
DefinePlanarSurface_FromSegments ............................................ 42
Define3SidedSurface ....................................................................... 43
Table of Contents 5
Define4SidedSurface ....................................................................... 43
DefineVolume_FromSurfaces ......................................................... 44
Delete_All ......................................................................................... 44
Displace ............................................................................................ 45
Displace_ByVolume ......................................................................... 45
GetNumberOfRegions ..................................................................... 46
GetnumberofSegments ................................................................... 46
GetnumberofSurfaces ..................................................................... 46
GetnumberofVolumes ..................................................................... 47
GetSegment_FromPoint .................................................................. 47
GetSurface_FromPoint .................................................................... 48
GetVolume_FromPoint .................................................................... 48
LinearCopy ....................................................................................... 49
Rotate ................................................................................................ 49
Rotate_AboutX ................................................................................. 50
Rotate_AboutY ................................................................................. 50
Rotate_AboutZ ................................................................................. 51
SetConstantXPlane .......................................................................... 51
SetConstantYPlane .......................................................................... 51
SetConstantZPlane .......................................................................... 52
SweepSegment_AboutX .................................................................. 52
SweepSegment_AboutY .................................................................. 53
6 INTEGRATED API Guide
SweepSegment_AboutZ .................................................................. 53
SweepSegment_AlongX .................................................................. 54
SweepSegment_AlongY .................................................................. 54
SweepSegment_AlongZ .................................................................. 55
SweepSegment_Linear .................................................................... 55
SweepSurface_AboutX .................................................................... 56
SweepSurface_AboutY .................................................................... 57
SweepSurface_AboutZ .................................................................... 57
SweepSurface_AlongX .................................................................... 58
SweepSurface_AlongY .................................................................... 58
SweepSurface_AlongZ .................................................................... 59
SweepSurface_Linear ...................................................................... 59
HealOverlappingPlanarSurfaces_All .............................................. 60
GEOMETRY2D ......................................................................................... 60
AngularCopy..................................................................................... 61
Create2DSpline ................................................................................. 61
CreateArc_ByCenterRadiusAngles ................................................ 62
CreateArc_By3Points....................................................................... 63
CreateArc_ByStartEndCenterPoints .............................................. 63
CreateLine......................................................................................... 64
2D_Displace ...................................................................................... 64
GetLinePointCoordinates ................................................................ 65
Table of Contents 7
GetArcPointCoordinates ................................................................. 66
GetSegment_FromPoint .................................................................. 66
GetRegion_FromPoint ..................................................................... 67
GetRegionID_FromSegments ......................................................... 67
GetRegionOnLeft_FromSegment ................................................... 68
GetRegionOnRight_FromSegment................................................. 68
LinearCopy ....................................................................................... 69
Rotate ................................................................................................ 69
PHYSICS ................................................................................................. 70
AddCollectorsurface_ByNumber .................................................... 70
AddEmissionPoint ........................................................................... 70
AddEmittersurface_ByNumber ....................................................... 71
AddParticle_ToLibrary .................................................................... 72
CreatePointCharges ........................................................................ 72
CreatePointEmitter .......................................................................... 73
CreateSurfaceCollector ................................................................... 73
CreateSurfaceEmitter ...................................................................... 74
CreateWaveGuideSource ................................................................ 74
Delete2DBoundaryCondition .......................................................... 75
Delete2DBoundaryCondition_BySegment..................................... 75
Delete2DMagnetization .................................................................... 76
Delete2DMagnetization_ByRegion ................................................. 76
8 INTEGRATED API Guide
Delete2DVoltage ............................................................................... 76
Delete2DVoltage_BySegment ......................................................... 77
Delete2DVolumeCurrent .................................................................. 77
Delete2DVolumeCurrent_ByRegion ............................................... 77
DeleteMagnetization......................................................................... 78
DeleteMagnetization_ByVolume ..................................................... 78
DeletePointCharges ......................................................................... 79
DeleteVoltage ................................................................................... 79
DeleteVolatge_BySurface ................................................................ 79
DeleteBoundaryCondition ............................................................... 80
DeleteBoundaryCondition_BySurface ........................................... 80
EditEmissionPoint............................................................................ 80
Get2DModelType .............................................................................. 81
Get2DVoltage_BySegment .............................................................. 82
GetBackgroundPermittivity ............................................................. 82
GetMaterialByIndex .......................................................................... 83
GetMaterialConductivity .................................................................. 83
GetMaterialList ................................................................................. 84
GetMaterialList2 ............................................................................... 84
GetMaterialPermeability .................................................................. 85
GetMaterialPermittivity .................................................................... 85
GetMaterialThermalConductivity .................................................... 86
Table of Contents 9
MovePointCharges .......................................................................... 86
Set2DFloating ................................................................................... 86
Set2DFloating_BySegment ............................................................. 87
Set2DLinearVoltage_BySegment ................................................... 87
Set2DMagnetizationAngle ............................................................... 88
Set2DMagnetizationAngle_ByRegion ............................................ 88
Set2DModelType .............................................................................. 89
Set2DTemperature ........................................................................... 89
Set2DTemperature_BySegment ..................................................... 90
Set2DVoltage .................................................................................... 90
Set2DVoltage_BySegment .............................................................. 91
Set2DVoltageMagnitudePhase ....................................................... 91
Set2DVoltageMagnitudePhase_BySegment .................................. 92
Set2DVolumeCurrent ....................................................................... 92
Set2DVolumeCurrent_ByRegion .................................................... 93
Set2DVolumeCurrentMagnitudePhase .......................................... 93
Set2DVolumeCurrentMagnitudePhase_ByRegion ........................ 94
Set2DVolumeHeat ............................................................................ 94
Set2DVolumeHeat_ByRegion ......................................................... 95
SetFloating ....................................................................................... 95
SetFloating_BySurface .................................................................... 96
SetBackgroundPermittivity ............................................................. 96
10 INTEGRATED API Guide
SetBalanced...................................................................................... 97
SetCongruentMagnet_ByVolume ................................................... 97
SetEmissionRegimeTo_EnhancedFowlerNordheim ..................... 98
SetEmissionRegimeToExtendedSchottky ..................................... 98
SetEmissionRegimeToFowlerNordheim ........................................ 99
SetEmissionRegimeTo_I ................................................................. 99
SetLineCurrent_BySegment.......................................................... 103
SetMaterial_ByVolume................................................................... 106
SetMaterialPermittivity................................................................... 108
Table of Contents 11
RefineSolution................................................................................ 117
SetSegmentWeight......................................................................... 125
CreateStreamlines_FromPoint...................................................... 129
Get2DForce..................................................................................... 137
GetBeamCenterAndDiameter........................................................ 139
Get2DVoltage.................................................................................. 143
GetNumberOfPoints_OnStreamlines............................................ 153
GetNumberOfRayIntersectionsWithPlane.................................... 153
GetCoordinateTimeDistance_OnRay............................................ 154
SetElectricStreamlinesDirection................................................... 164
SetAnalysis..................................................................................... 176
SetLookatPoint............................................................................... 180
SetUpAxisX..................................................................................... 182
SetUpAxisY..................................................................................... 182
Show................................................................................................ 185
CHAPTER 1
INTRODUCTION TO
SCRIPTING/PROGRAMMING
GETTING STARTED
Even if you are expecting to exclusively program your INTEGRATED
software you should make sure you understand the interface. The API
and interface are based on the same INTEGRATED approach to
simulation – the same model hierarchy and workflow. If you are a first
time user, we strongly recommended that you complete the Sample
Sessions in the Quick Start Guide before proceeding to your own
designs or reading the bulk of this manual for the API.
22 INTEGRATED API Guide
After completing the Quick Start Guide samples you should understand
the interface, workflow and built-in aids of your INTEGRATED program.
This manual then serves as a reference for how the same approach
translates into an API.
MANUAL CONVENTIONS
Periodically, the manual uses tips, notes or important messages to help
you efficiently create and solve your models. These messages have the
following format:
The light bulb marks a tip about how to use the program more
efficiently. For example, a tip might give you a keyboard
shortcut for a commonly used command.
PRODUCT SUPPORT
While evaluating a program, if you have any questions, please do not
hesitate to contact our Technical Support staff at +1 (204) 632-5636 in
Canada or by e-mail at support@integratedsoft.com
CHAPTER 2
EXPLANATION OF THE
INTEGRATED API
A good development environment will greatly reduce the amount you need
to memorize or type to use the API. For example, below is an example in
VisualStudio where the Integrated API has been called with the handle
_Document. Then when you start typing _D, you are immediately
presented with the option:
Next press the <Enter> key and the word _Document fills in for you.
Type the period and a list of functions available in _Document appears:
You can scroll down the list, or keep typing to narrow down the selection:
Once you have the entire function name selected, typing the bracket will
present the format of the variables to be passed:
Hence, what is most useful, and what will be the focus of this chapter is to
understand the conventions used to name the functions so that with your
development tool’s help, you can write with minimal typing and minimal
memorization of the function names.
3) The program will open and setup the registry in the process.
Note: this is NOT the same as running in an account with
Administrator rights. This is a special mode which sets up the
registry. It may be that your system will setup the registry
automatically if you have administrator rights, but if that fails you
will need to follow this procedure.
4) Close the program. Until you run another IES.exe program “As
Administrator” this will be the program associated with
IES.Document.
Name Structure:
Category_Action_SelectionType(parameters)
All functions will have a Category and Action. That is, a type of function
and what the function does.
Example:
Analysis_CreateStreamlines
However, the same API can be used for any INTEGRATED program
including multiphysics programs. Hence streamlines could be electric or
magnetic, 2D or 3D. The naming convention assumes 3D as the default
but no default field type. Hence to invoke a 2D electric streamline function
the name must begin:
Analysis_Create2DElectricStreamlines
Analysis_Create2DElectricStreamlines_FromSegments
Category_Action_SelectionType
Case:
Uppercase is used to visually show the break between attached words in
a function name.
Abbreviations:
Abbreviations are only used when they are in common use in English
speech for the given word. For example:
Used:
In normal English speech “2D” is commonly used instead of “two
dimensional”, “3D” instead of “three dimensional”, etc. In those
cases the same abbreviations are used by the INTEGRATED API.
Not Used:
Even seemingly obvious abbreviations such as “geo” for “geometry”
are not used in the INTEGRATED API. Creating abbreviations
simply to shorten function names would make the code more
difficult to read.
CATEGORY
This is mostly the same as the name of the menu where the command is
found in the interface (or would be found for commands that are API-only).
Exceptions:
Geometry
Geometry2D
Physics
Solution
Analysis
View
Object
Model
Window
ACTION
Action names are chosen to follow an English-like structure such as “set
the voltage” becomes SetVoltage.
SELECTIONTYPE / DATAFORM
The type of selection is assumed to be a named object using its name.
Where another method of selection is used, it will appear with a prefix of
From or By for getting data and To for assigning data.
CHAPTER 3
This chapter lists the functions available as of the version 9.2 release
according to their category. The list begins with those categories that
correspond to program top level menus, in the order (left to right) they
appear in the program.
FILE
ExportImage_AsBMP
File_ExportImage_AsBMP(string sFullPath, ref short iErr)
Applies to: All Programs
This function exports the image as a BMP file in the INTEGRATED
program.
Error code*.
iErr
ExportImage_AsGIF
File_ExportImage_AsGIF(string sFullPath, ref short iErr)
Applies to: All Programs
ExportImage_AsJPG
File_ExportImage_AsJPG(string sFullPath, ref short iErr)
Applies to: All Programs
This function exports the image as a JPG file in the INTEGRATED
program.
ExportImage_AsPNG
File_ExportImage_AsPNG(string sFullPath, ref short iErr)
Applies to: All Programs
This function exports the image as a PNG file in the INTEGRATED
program.
Open
File_Open(string sFullPath, ref short iErr)
This function opens (loads) a specified model file into the INTEGRATED
program.
Save
File_Save(string sFullPath, ref short iErr)
This function saves the active model file in the INTEGRATED program
into a specified name and location.
Save2DElectricStreamlines
File_Save2DElectricStreamlines(string sFilePath, int
FormatVersion, ref short iErr)
SaveStreamlines
File_SaveStreamlines(string sFilePath, int FormatVersion, ref short
iErr)
This function saves the active model file in the INTEGRATED program
into a specified name and location.
GEOMETRY
AngularCopy
Geometry_AngularCopy(string sName, double x1, double y1,
double z1, double x2, double y2, double z2, double Angle, int
NumberOfCopies, ref short iErr)
This functions creates an angular copy about an Axis from (x1, y1, z1) to
(x2, y2, z2).
x1, x2, y1, y2, z1, z2 The coordinates of the start and end points of
the axis.
AngularCopy_AboutXaxis
Geometry_AngularCopy_AboutX(string sName, double Angle, int
NumberOfCopies, ref short iErr)
This functions creates an angular copy about X Axis from (sName, Angle,
NumberofCopies)
AngularCopy_AboutYaxis
Geometry_AngularCopy_AboutY(string sName, double Angle, int
NumberOfCopies, ref short iErr)
This functions creates an angular copy about Y Axis from (sName, Angle,
NumberofCopies)
AngularCopy_AboutZaxis
Geometry_AngularCopy_AboutZ(string sName, double Angle, int
NumberOfCopies, ref short iErr)
This functions creates an angular copy about Z Axis from (sName, Angle,
NumberofCopies)
CreateLine
Geometry_CreateLine(double x1, double y1, double z1, double
x2, double y2, double z2, ref int SegNumber, ref short iErr)
This function draws a straight line segment from (x1, y1, z1) to (x2, y2,
z2).
x1, x2, y1, y2, z1, z2 The coordinates of the end points.
CreateArc_By3points
Geometry_CreateArc_By3Points(double StX, double StY, double
StZ, double MidX, double MidY, double MidZ, double EndX,
double EndY, double EndZ, ref int SegNumber, ref short iErr)
This function draws an arc from (StX, StY, StZ) to (MidX, MidY, MidZ) to
(EndX, EndY, EndZ).
StX, StY, StZ, MidX, MidY, MidZ, EndX, The coordinates of the
EndY, EndZ. start, middle and end points.
CreateCube
Geometry_CreateCube_ByCenterLength(double cX, double cY,
double cZ, double length, ref int VolNumber, ref short iErr)
CreateSphere_ByCenterRadius
Geometry_CreateSphere_ByCenterRadius(double cX, double cY,
double cZ, double Radius, ref int VolNumber, ref short iErr)
CreateSpline
Geometry_CreateSpline(object saXArr, object saYArr, object
saZArr, ref int SegNumber, ref short iErr)
This function creates a spline froma point array (saXArr, saYArr, saZArr).
DefinePlanarSurface_FromSegments
Geometry_DefinePlanarSurface_FromSegments(object
saArrOfSegments, int SrfNumber, ref short iErr)
This
SrfNumber The number of created surface.
Define3SidedSurface
Geometry_Define3SidedSurface(int iSeg1, int iSeg2, int iSeg3, ref
int SrfNumber, ref short iErr)
Define4SidedSurface
Geometry_Define4SidedSurface(int iSeg1, int iSeg2, int iSeg3, int
iSeg4, ref int SrfNumber, ref short iErr)
DefineVolume_FromSurfaces
Geometry_DefineVolume_FromSurfaces(object saArrOfSurfaces,
ref int VolNumber, ref short iErr)
Delete_All
Geometry_Delete_All()
This function deletes all the geometry, but not the object definitions.
Displace
Geometry_Displace(string sName, double xDisplacement, double
yDisplacement, double zDisplacement, ref short iErr)
Displace_ByVolume
Geometry_Displace_ByVolume(int iVolume, double
xDisplacement, double yDisplacement, double zDisplacement, ref
short iErr)
GetNumberOfRegions
Geometry_GetNumberOfRegions(ref int iNumberOfRegions, ref
short iErr)
GetnumberofSegments
Geometry_GetNumberOfSegments(ref int iNumberOfSegments,
ref short iErr)
GetnumberofSurfaces
Geometry_GetNumberOfSurfaces(ref int iNumberOfSurfaces, ref
short iErr)
GetnumberofVolumes
Geometry_GetNumberOfVolumes(ref int iNumberOfVolumes, ref
short iErr)
GetSegment_FromPoint
Geometry_GetSegment_FromPoint(double x, double y, double z, int
iSegment, ref short iErr)
GetSurface_FromPoint
Geometry_GetSurface_FromPoint(double x, double y, double z,
ref int iSurfaceNumber, ref short iErr)
This function gets the Surface ID from point. Returns the surface number
that is closest to the point
GetVolume_FromPoint
Geometry_GetVolume_FromPoint(double x, double y, double z,
ref int iVolumeNumber, ref short iErr)
This function gets the volume ID from point. Returns the volume number
that contains the point
LinearCopy
Geometry_LinearCopy(string sName, double xDisplacement,
double yDisplacement, double zDisplacement, int
NumberOfCopies, ref short iErr)
Rotate
Geometry_Rotate(string sName, double x1, double y1, double
z1, double x2, double y2, double z2, double Angle, ref short iErr)
X1, y1, z1, x2 ,y2, z2 The x,y,z coordinates of the start and
the end point of the axis.
Rotate_AboutX
Geometry_Rotate_AboutX(string sName, double Angle, ref short
iErr)
Rotate_AboutY
Geometry_Rotate_AboutY(string sName, double Angle, ref short
iErr)
Rotate_AboutZ
Geometry_Rotate_AboutZ(string sName, double Angle, ref short
iErr)
SetConstantXPlane
Geometry_SetConstantXPlane(double depth, ref short iErr)
This function sets the geometry mode to 3D Planar using the specified
constant x plane. This will be the plane showing up with the grid in the
program and will be the plane which Geometry2D API commands draw
on.
SetConstantYPlane
Geometry_SetConstantYPlane(double depth, ref short iErr)
This function sets the geometry mode to 3D Planar using the specified
constant y plane. This will be the plane showing up with the grid in the
program and will be the plane which Geometry2D API commands draw
on.
SetConstantZPlane
Geometry_SetConstantZPlane(double depth, ref short iErr)
This function sets the geometry mode to 3D Planar using the specified
constant z plane. This will be the plane showing up with the grid in the
program and will be the plane which Geometry2D API commands draw
on.
SweepSegment_AboutX
Geometry_SweepSegment_AboutX(int iSegment, double Angle,
ref int SrfNumber, ref short iErr)
SweepSegment_AboutY
Geometry_SweepSegment_AboutY(int iSegment, double Angle,
ref int SrfNumber, ref short iErr)
SweepSegment_AboutZ
Geometry_SweepSegment_AboutZ(int iSegment, double Angle,
ref int SrfNumber, ref short iErr)
SweepSegment_AlongX
Geometry_SweepSegment_AlongX(int iSegment, double length,
ref int SrfNumber, ref short iErr)
SweepSegment_AlongY
Geometry_SweepSegment_AlongY(int iSegment, double length,
ref int SrfNumber, ref short iErr)
SweepSegment_AlongZ
Geometry_SweepSegment_AlongZ(int iSegment, double length,
ref int SrfNumber, ref short iErr)
SweepSegment_Linear
Geometry_SweepSegment_Linear(int iSegment, double x1, double y1,
double z1, double x2, double y2, double z2, int SrfNumber, ref short iErr)
SweepSurface_AboutX
Geometry_SweepSurface_AboutX(int iSurface, double Angle, ref
int VolNumber, ref short iErr)
SweepSurface_AboutY
Geometry_SweepSurface_AboutY(int iSurface, double Angle, ref
int VolNumber, ref short iErr)
SweepSurface_AboutZ
Geometry_SweepSurface_AboutZ(int iSurface, double Angle, ref
int VolNumber, ref short iErr)
SweepSurface_AlongX
Geometry_SweepSurface_AlongX(int iSurface, double length, ref
int VolNumber, ref short iErr)
SweepSurface_AlongY
Geometry_SweepSurface_AlongY(int iSurface, double length, ref
int VolNumber, ref short iErr)
SweepSurface_AlongZ
Geometry_SweepSurface_AlongZ(int iSurface, double length, ref
int VolNumber, ref short iErr)
SweepSurface_Linear
Geometry_SweepSurface_Linear(int isurface, double x1, double y1,
double z1, double x2, double y2, double z2, int VolNumber, ref short
iErr)
HealOverlappingPlanarSurfaces_All
Geometry_HealOverlappingPlanarSurfaces_All(ref short iErr)
GEOMETRY2D
The documentation for this section is written for 2D programs.
When using Geometry2D functions in a 3D program you can
choose to be in 2D mode or 3D planar mode. On the
appropriate plane, the x-values documented below become u-
values and the y-values become v-values for the selected
working plane.
AngularCopy
Geometry2D_AngularCopy(string sName, double xCenterAxis,
double yCenterAxis, double Angle, int NumberOfCopies, ref short
iErr)
This function creates copy of the named object rotated about an axis.
Create2DSpline
Geometry2D_Create2DSpline(object saXArr, object saYArr, ref int
SegNumber, ref short iErr)
This function creates an arc on a plane from the given center, radius, start
angle and end angle.
CreateArc_ByCenterRadiusAngles
Geometry2D_CreateArc_ByCenterRadiusAngles(double CntrX,
double CntrY, double Radius, double AngStart, double AngEnd,
ref int SegNumber, ref short iErr)
This function creates an arc on a plane from the given center, radius, start
angle and end angle.
CreateArc_By3Points
Geometry2D_CreateArc_By3Points(double StX, double StY,
double MidX, double MidY, double EndX, double EndY, ref int
SegNumber, ref short iErr)
StX, StY, StZ, MidX, MidY, MidZ, The coordinates of the start,
EndX, EndY, EndZ. middle and end points.
CreateArc_ByStartEndCenterPoints
Geometry2D_CreateArc_ByStartEndCenterPoints(double StX,
double StY, double EndX, double EndY, double CntrX, double
CntrY, ref int SegNumber, ref short iErr)
CreateLine
Geometry2D_CreateLine(double x1, double y1, double x2,
double y2, ref int SegNumber, ref short iErr)
2D_Displace
Geometry2D_Displace(string sName, double xDisplacement,
double yDisplacement, ref short iErr)
GetLinePointCoordinates
Geometry2D_GetLinePointCoordinates(int iSegment, double x1, double
y1, double x2, double y2, ref short iErr)
GetArcPointCoordinates
Geometry2D_GetArcPointCoordinates(int iSegment, double x1, double
y1, double x2, double y2, double x3, double y3, ref short iErr)
GetSegment_FromPoint
Geometry2D_GetSegment_FromPoint(double x, double y, int iSegment,
ref short iErr)
GetRegion_FromPoint
Geometry2D_GetRegionID_FromPoint(double x, double y, ref int
iRegionNumber)
This function returns the ID number of the region around a point in 2D.
GetRegionID_FromSegments
Geometry2D_GetRegionID_FromSegments(Object
saArrOfSegments, ref int iRegionNumber, ref short iErr)
This function returns the ID number of the region bounded by the set of
segments listed in the array. Not all bounding segments are needed, but
they need to uniquely define one region.
GetRegionOnLeft_FromSegment
Geometry2D_GetRegionOnLeft_FromSegment(int iSegment, ref
int iRegionNumber)
This function returns the ID number of the region on the left side of a
segment specified by its ID number. The left side is specified according to
the direction in which the segment was drawn. For example, a vertical
segment drawn from (0, 0) to (0, 1) would have the negative x half-plane
on the left and the positive x half-plane on the right.
GetRegionOnRight_FromSegment
Geometry2D_GetRegionOnRight_FromSegment(int iSegment, ref
int iRegionNumber)
This function returns the ID number of the region on the right side of a
segment specified by its ID number. The right side is specified according
to the direction in which the segment was drawn. For example, a vertical
segment drawn from (0, 0) to (0, 1) would have the negative x half-plane
on the left and the positive x half-plane on the right.
LinearCopy
Geometry2D_LinearCopy(string sName, double xDisplacement,
double yDisplacement, int NumberOfCopies, ref short iErr)
Rotate
Geometry2D_Rotate(string sName, double xCenterAxis, double
yCenterAxis, double Angle, ref short iErr)
This function rotates the named object by an angle about a specified axis.
PHYSICS
AddCollectorsurface_ByNumber
Physics_AddCollectorSurface_ByNumber(string sCollectorName,
int SurfaceIdNumber, ref short iErr)
AddEmissionPoint
Energy Energy
Radius Radius
Current Current
AddEmittersurface_ByNumber
Physics_AddEmitterSurface_ByNumber(string sEmitterName, int
SurfaceIdNumber, int SurfaceSideDirection, ref short iErr)
AddParticle_ToLibrary
Physics_AddParticle_ToLibrary(string sParticleName, double
dCharge, double dMass, double dRadius, ref short iErr)
dCharge charge
dMass Mass
dRadius Radius
CreatePointCharges
Physics_CreatePointCharges(object saXArr, object saYArr, object
saZArr, object saChargeArr, ref short iErr)
CreatePointEmitter
Physics_CreatePointEmitter(string sEmitterName, ref short iErr)
CreateSurfaceCollector
Physics_CreateSurfaceCollector(string sCollectorName, ref short
iErr)
CreateSurfaceEmitter
Physics_CreateSurfaceEmitter(string sEmitterName, ref short iErr)
CreateWaveGuideSource
Physics_CreateWaveGuideSource(int Type, int ModeType, int
ModeNo_m, int ModeNo_n, double VoltR, double VoltI, ref short
iErr)
ModeType TE or TM setting
0 - TE
1 - TM
Delete2DBoundaryCondition
Physics_Delete2DBoundaryCondition(string sName, ref short
iErr)
This function deletes any boundary condition assignments from the named
object.
Delete2DBoundaryCondition_BySegment
Physics_Delete2DBoundaryCondition_BySegment(int iSegment,
ref short iErr)
Delete2DMagnetization
Physics_Delete2DMagnetization(string sName, ref short iErr)
Delete2DMagnetization_ByRegion
Physics_Delete2DMagnetization_ByRegion(int iRegion, ref short
iErr)
This function deletes any magnetic assignments from the region identified
by its ID.
Delete2DVoltage
Physics_Delete2DVoltage(string sName, ref short iErr)
This function deletes any voltage assignments from the named object.
Delete2DVoltage_BySegment
Physics_Delete2DVoltage_BySegment(int iSegment, ref short iErr)
Delete2DVolumeCurrent
Physics_Delete2DVolumeCurrent(string sName, ref short iErr)
This function deletes any volume currents from the named object.
Delete2DVolumeCurrent_ByRegion
Physics_Delete2DVolumeCurrent_ByRegion(int iRegion, ref short
iErr)
This function deletes any volume current from the given region ID.
DeleteMagnetization
Physics_DeleteMagnetization(string sName, ref short iErr)
DeleteMagnetization_ByVolume
Physics_DeleteMagnetization_ByVolume(int iVolume, ref short
iErr)
DeletePointCharges
Physics_DeletePointCharges(ref short iErr)
DeleteVoltage
Physics_DeleteVoltage(string sName, ref short iErr)
DeleteVolatge_BySurface
Physics_DeleteVoltage_BySurface(int iSurface, ref short iErr)
DeleteBoundaryCondition
Physics_DeleteBoundaryCondition(string sName, ref short iErr)
DeleteBoundaryCondition_BySurface
Physics_DeleteBoundaryCondition_BySurface(int isurface, ref short iErr)
EditEmissionPoint
Physics_EditEmissionPoint(string sEmitterName, int PointNumber,
double x, double y, double z, double dirX, double dirY, double dirZ,
double Radius, double Energy, double Current, double StartTime, double
StartDist, string sParticleName, ref short iErr)
Energy Energy
Radius Radius
Current Current
Get2DModelType
Physics_Get2DModelType(ref int ModelType2D, ref short iErr)
0 – 2D (semi-infinite)
1 – x-rotational
2 – y-rotational
Get2DVoltage_BySegment
Physics_Get2DVoltage_BySegment(int iSegment, out short
isVoltageDefined, out double dVoltage, ref short iErr)
GetBackgroundPermittivity
Physics_GetBackgroundPermittivity(ref double dRelPermittRe, ref
double dRelPermittIm, ref short iErr)
GetMaterialByIndex
Physics_GetMaterialByIndex(int Idx, ref string sMaterialName, ref
int iNumOfMaterials, ref short iErr)
Idx Index
GetMaterialConductivity
Physics_GetMaterialConductivity(string sMatName, ref double
dConductivity, ref short iErr)
This function returns the value of the electrical conductivity of the named
material in the model.
GetMaterialList
Physics_GetMaterialList(ref System.Array saMaterials)
This function returns an array listing the names of all materials in the
model. Use GetMaterialList for VisualStudio. For Excel and Matlab use
GerMaterialList2
GetMaterialList2
Physics_GetMaterialList2(out object saMaterials)
GetMaterialPermeability
Physics_GetMaterialPermeability(string sMatName, ref double
dRelPermeabRe, ref double dRelPermeabIm, ref short iErr)
GetMaterialPermittivity
Physics_GetMaterialPermittivity(string sMatName, ref double
dRelPermittRe, ref double dRelPermittIm, ref short iErr)
GetMaterialThermalConductivity
Physics_GetMaterialThermalConductivity(string sMatName, ref
double dConductivity, ref short iErr)
MovePointCharges
Physics_MovePointCharges(object saXArr, object saYArr, object
saZArr, ref short iErr)
Set2DFloating
Physics_Set2DFloating(string sName, int iFloatingNumber, ref
short iErr)
Set2DFloating_BySegment
Physics_Set2DFloating_BySegment(int iSegment, int
iFloatingNumber, ref short iErr)
Set2DLinearVoltage_BySegment
Physics_Set2DLinearVoltage_BySegment(int iSegment, double
dBC_st, double dBC_fi, ref short iErr)
are defined by the order in which the points were drawn when the
geometry was created.
Set2DMagnetizationAngle
Physics_Set2DMagnetizationAngle(string sName, double dAngle,
ref short iErr)
This function sets the magnetization direction for the named object by
specifying an angle relative to the x-axis.
Set2DMagnetizationAngle_ByRegion
Physics_Set2DMagnetization_ByRegion (int iRegion, double
dAngle, ref short iErr)
Set2DModelType
Physics_Set2DModelType(int NewModelType2D, ref short iErr)
0 – 2D (semi-infinite)
1 – x-rotational
2 – y-rotational
Set2DTemperature
Physics_Set2DTemperature(string sName, double dBC, ref short
iErr)
Set2DTemperature_BySegment
Physics_Set2DTemperature_BySegment(int iSegment, double
dBC, ref short iErr)
Set2DVoltage
Physics_Set2DVoltage(string sName, double dBC, ref short iErr)
Set2DVoltage_BySegment
Physics_Set2DVoltage_BySegment(int iSegment, double dBC, ref
short iErr)
Set2DVoltageMagnitudePhase
Physics_Set2DVoltageMagnitudePhase(string sName, double
dBC, double dPhase, ref short iErr)
This function sets magnitude and phase of voltage for the named object.
In static model the phase is ignored.
Set2DVoltageMagnitudePhase_BySegment
Physics_Set2DVoltageMagnitudePhase_BySegment(int
iSegment, double dBC, double dPhase, ref short iErr)
This function sets magnitude and phase of voltage for the referenced
object ID. In static models the phase is ignored.
Set2DVolumeCurrent
Physics_Set2DVolumeCurrent(string sName, double dVC, ref
short iErr)
Set2DVolumeCurrent_ByRegion
Physics_Set2DVolumeCurrent_ByRegion(int iRegion, double
dVC, ref short iErr)
Set2DVolumeCurrentMagnitudePhase
Physics_Set2DVolumeCurrentMagnitudePhase(string sName,
double dVC, double dPhase, ref short iErr)
This function assigns volume current magnitude and phase to the named
object. In static models the phase is ignored.
Set2DVolumeCurrentMagnitudePhase_ByRegion
Physics_Set2DVolumeCurrentMagnitudePhase_ByRegion(int
iRegion, double dVC, double dPhase, ref short iErr)
Set2DVolumeHeat
Physics_Set2DVolumeHeat(string sName, double dVHeat, ref
short iErr)
Set2DVolumeHeat_ByRegion
Physics_Set2DVolumeHeat_ByRegion(int iRegion, double
dVHeat, ref short iErr)
SetFloating
Physics_SetFloating(string sName, int ifloatingNumber, ref short iErr)
SetFloating_BySurface
Physics_SetFloating_BySurface(int isurface, int ifloatingNumber, ref short
iErr)
SetBackgroundPermittivity
Physics_SetBackgroundPermittivity(double dRelPermittRe,
double dRelPermittIm, ref short iErr)
This function sets the value of the relative permittivity of the Background
material.
SetBalanced
Physics_SetBalanced()
SetCongruentMagnet_ByVolume
Physics_SetCongruentMagnet_ByVolume(int iVolume, int
iSurface, ref short iErr)
SetEmissionRegimeTo_EnhancedFowlerNordheim
Physics_SetEmissionRegimeTo_EnhancedFowlerNordheim(strin
g sEmitterName, double dWorkFunc, double dBeta, double dAlfa,
ref short iErr)
dBeta Beta
dAlfa Alfa
SetEmissionRegimeToExtendedSchottky
Physics_SetEmissionRegimeTo_ExtendedSchottky(string
sEmitterName, double dWorkFunc, double dTemperature, double
dA, ref short iErr)
dTemperature Temperature
dA dA
SetEmissionRegimeToFowlerNordheim
Physics_SetEmissionRegimeTo_FowlerNordheim(string
sEmitterName, double dWorkFunc, ref short iErr)
SetEmissionRegimeTo_I
Physics_SetEmissionRegimeTo_I(string sEmitterName, double I,
ref short iErr)
I Current
SetEmissionRegimeTo_J
Physics_SetEmissionRegimeTo_J(string sEmitterName, double J,
ref short iErr)
J Current density
SetEmissionRegimeTo_RichardsonDushman
Physics_SetEmissionRegimeTo_RichardsonDushman(string
sEmitterName, double dWorkFunc, double dTemperature, double
dA, ref short iErr)
dTemperature Temperature
dA dA
SetEmissionRegimeTo_Schottky
Physics_SetEmissionRegimeTo_Schottky(string sEmitterName,
double dWorkFunc, double dTemperature, double dA, ref short
iErr)
dA dA
SetEmissionRegimeTo_ChildsLaw
Physics_SetEmissionRegimeTo_ChildsLaw(string sEmitterName,
short iGapMode, double dGapRate, double dUserGapSize, ref short
iErr)
SetEmitterColor
Physics_SetEmitterColor(string sEmitterName, short iRedValue,
short iGreenValue, short iBlueValue, ref short iErr)
SetEmitterParticle
Physics_SetEmitterParticle(string sEmitterName, string
sParticleName, ref short iErr)
SetLineCurrent_BySegment
Physics_SetLineCurrent_BySegment(int iSegment, int iDirection,
double dCurrent, ref short iErr)
SetLineCurrentMagnitudePhase_BySegment
Physics_SetLineCurrentMagnitudePhase_BySegment(int
iSegment, int iDirection, double dCurrentMag, double
dCurrentPhase, ref short iErr)
Assigns line current magnitude and phase to the segment specified by its
ID number.
SetMagnetizationDirection
Physics_SetMagnetizationDirection(string sName, double dirX,
double dirY, double dirZ, ref short iErr)
dirX, dirY and dirZ The components of the magnetization in the x-, y-
and z-directions.
SetMagnetizationDirection_ByVolume
Physics_SetMagnetizationDirection_ByVolume(int iVolume,
double dirX, double dirY, double dirZ, ref short iErr)
dirX, dirY and dirZ The components of the magnetization in the x-, y-
and z-directions.
SetMaterial
Physics_SetMaterial(string sObjName, string sMaterial, ref short
iErr)
SetMaterial_ByRegion
Physics_SetMaterial_ByRegion(int iRegion, string sMaterial, ref
short iErr)
SetMaterial_ByVolume
Physics_SetMaterial_ByVolume(int iVolume, string sMaterial, ref
short iErr)
SetMaterialConductivity
Physics_SetMaterialConductivity(string sMatName, double
dConductivity, ref short iErr)
This function sets the value of the electric conductivity of the chosen by
material name.
SetMaterialPermeability
Physics_SetMaterialPermeability(string sMatName, double
dRelPermeabRe, double dRelPermeabIm, ref short iErr)
This function sets the value of the relative permeability of the chosen by
material name.
SetMaterialPermittivity
Physics_SetMaterialPermittivity(string sMatName, double
dRelPermittRe, double dRelPermittIm, ref short iErr)
This function sets the value of the relative permittivity of the chosen by
name.
SetMaterialThermalConductivity
Physics_SetMaterialThermalConductivity(string sMatName,
double dConductivity, ref short iErr)
This function sets the value of the thermal conductivity of the chosen by
material name.
SetNumberEmissionPoints
Physics_SetNumberEmissionPoints(string sEmitterName, int
numPointsReq, ref int numPointsAct, ref short iErr)
SetPerfectLineConductor_BySegment
Physics_SetPerfectLineConductor_BySegment(int iSegment,
double Radius, ref short iErr)
SetPerfectSurfaceConductor_BySurface
Physics_SetPerfectSurfaceConductor_BySurface(int iSurface, ref
short iErr)
SetPerfectVolumeConductor_ByVolume
Physics_SetPerfectVolumeConductor_ByVolume(int iVolume, ref
short iErr)
SetPhasorMode
Physics_SetPhasorMode(double dFreq)
This function sets the Physics mode to phasor at the specified frequency.
SetPointChargeSize
Physics_SetPointChargesSize(double dSize, ref short iErr)
Dsize Size.
SetRectangularWaveGuideSource
Physics_SetRectangularWaveGuideSource(int Surface, int Side,
int iSegment, int iNode, ref short iErr)
SetStaticMode
Physics_SetStaticMode()
This function sets the Physics mode to static (no time dependence in the
sources).
SetUnbalanced
Physics_SetUnbalanced()
SetVoltage
Physics_SetVoltage(string sName, double dBC, ref short iErr)
SetVoltageBysurface
Physics_SetVoltage_BySurface(int iSurface, double dBC, ref short
iErr)
This function sets the voltage by surface on the specified object name.
iSurface Surface
SetVoltageMagnitudePhase
Physics_SetVoltageMagnitudePhase(string sName, double dBC,
double dPhase, ref short iErr)
SetVoltageMagnitudePhase_BySurface
Physics_SetVoltageMagnitudePhase_BySurface(int iSurface,
double dBC, double dPhase, ref short iErr)
This function sets the voltage magnitude and phase by surface ID.
SetVolumeCharge
Physics_SetVolumeCharge(string sName, double Charge, ref
short iErr)
SetVolumeCharge_ByVolume
Physics_SetVolumeCharge_ByVolume(int iVolume, double
Charge, ref short iErr)
SetVolumeCurrent_ByVolume
Physics_SetVolumeCurrent_ByVolume(int iVolume, int iSurface,
double dCurrent, ref short iErr)
SetVolumeCurrentMagnitudePhase_ByVolume
Physics_SetVolumeCurrentMagnitudePhase_ByVolume(int
iVolume, int iSurface, double dCurrentMag, double dCurrentPhase,
ref short iErr)
This function assigns volume current RMS magnitude and phase to the 6-
sided volume specified by ID entering through a surface specified by ID.
SOLUTION
RunSolver
Solution_RunSolver(ref short iErr)
RefineSolution
Solution_Refine(ref short iErr)
DeleteSolution
Solution_DeleteSolution(ref short iErr)
SetODE_ToRK4
Solution_SetODE_ToRK4(double dTimeInterval, int iNumSteps, ref
short iErr)
SetODE_ToRK5
Solution_SetODE_ToRK5(int iMaxSteps, double dAccuracy, short
iMaxDeltaFlag, double dMaxDelta, short iMinDeltaFlag, double
dMinDelta, ref short iErr)
SetODE_ToRK853
Solution_SetODE_ToRK853(int iMaxSteps, double dAccuracy, short
iMaxDeltaFlag, double dMaxDelta, short iMinDeltaFlag, double
dMinDelta, ref short iErr)
SetODE_ToBulirschStoer
Solution_SetODE_ToBulirschStoer(int iMaxSteps, double dAccuracy,
short iMaxDeltaFlag, double dMaxDelta, short iMinDeltaFlag, double
dMinDelta, ref short iErr)
SetMeshSegmentWeight
Solution_SetMeshSegmentWeight(int iSegment, double dWeight,
ref short iErr)
This function sets the priority weighting of a segment. The higher the
number is, the higher priority the solver will assign the segment when
assigning or refining elements.
MESH
AssignTriangular_AutomaticAll
Mesh_AssignTriangular_AutomaticAll(int numElements, ref short
iErr)
AssignTriangular_AutomaticLocal
Mesh_AssignTriangular_AutomaticLocal(string sName, int
numElements, ref short iErr)
AssignTetrahedral_AutomaticAll
Mesh_AssignTetrahedral_AutomaticAll(int numElements, ref short iErr)
AssignTetrahedral_AutomaticLocal
Mesh_AssignTetrahedral_AutomaticLocal(string sName, int
numElements, ref short iErr)
AssignQuadrilateral_AutomaticAll
Mesh_AssignQuadrilateral_AutomaticAll(int numElements, ref short iErr)
AssignQuadrilateral_AutomaticLocal
Mesh_AssignQuadrilateral_AutomaticLocal(string sName, int
numElements, ref short iErr)
AssignTriangular_BySurface
Mesh_AssignTriangular_BySurface(int iSurface, int numElements,
ref short iErr)
DeleteVolume_MeshAll
Mesh_DeleteVolumeMesh_All(ref short iErr)
SetMinimumVolumeMesh_OFF
Mesh_SetMinimumVolumeMesh_OFF(ref short iErr)
SetMinimumVolumeMesh_ON
Mesh_SetMinimumVolumeMesh_ON(ref short iErr)
SetSegmentWeight
Mesh_SetSegmentWeight(int iSegment, double dWeight, ref
short iErr)
Mesh Set Segment Weight. This function sets the priority weighting of a
segment. The higher the number is, the higher priority the solver will
assign the segment when assigning or refining elements
SetSurfaceWeight
Mesh_SetSurfaceWeight(int iSurface, double dWeight, ref short
iErr)
Mesh Set Surface Weight. This function sets the priority weighting of a
surface. The higher the number is, the higher priority the solver will assign
the surface when assigning or refining elements.
SetVolumeWeight
SetVolumeWeight(int iVolume, double dWeight, ref short iErr)
Mesh Set Volume Weight. This function sets the priority weighting of a
volume. The higher the number is, the higher priority the solver will assign
the volume when assigning or refining elements.
2D_SetRegionWeight
Mesh2D_SetRegionWeight(int iRegion, double dWeight, ref short
iErr)
Mesh2D Set Region Weight. This function sets the priority weighting of a
Region. The higher the number is, the higher priority the solver will assign
the Region when assigning or refining elements
ANALYSIS
Create2DElectricStreamlines
Analysis_Create2DElectricStreamlines(string sName, short
LinePerSeg, ref short iErr)
Create2DElectricStreamlines_FromPoint
Analysis_Create2DElectricStreamlines_FromPoint(double x,
double y, ref short iErr)
This function shows the electric streamline from a specified point in space.
Create2DElectricStreamlines_FromSegments
Analysis_Create2DElectricStreamlines_FromSegments(Object
saArrOfElems, short LinesPerSeg, ref short iErr)
Create2DStreamlines
Analysis_Create2DElectricStreamlines(string sName, short
LinePerSeg, ref short iErr)
Create2DStreamlines_FromPoint
Analysis_Create2DStreamlines_FromPoint(double x, double y,
ref short iErr)
CreateStreamlines_FromPoint
Analysis_CreateStreamlines_FromPoint(double x, double y,
double z, ref short iErr)
CreateStreamlines_FromSegments
Analysis_CreateStreamlines_FromSegments(object saArrOfElems,
short LinePerSeg, ref short iErr)
CreateStreamlines_FromSurface
Analysis_CreateStreamlines_FromSurfaces(object saArrOfElems,
short LinePerSurf, ref short iErr)
DeleteStreamlines_All
Analysis_DeleteStreamlines_All()
Get2DElectricField
Analysis_Get2DElectricField(double x, double y, ref double Exr,
ref double Exi, ref double Eyr, ref double Eyi, ref short iErr)
This function reports the electric field at an (x,y) point. In a static model
the imaginary parts report as 0.
Get2DElectricFields
Analysis_Get2DElectricFields(int iNumPoints, object saXarr, object
saYarr, object saExR, object saExI, object saEyR, object saEyI, ref short
iErr)
Get2DElectricField_FromSegment
Analysis_Get2DElectricField_FromSegment(int iSegment, int
iSide, int iNumPoints, ref object saArrX, ref object saArrY, ref
object saArrD, ref object saArrEt, ref object saArrEn, ref object
saArrEmag, ref short iErr)
This function reports the electric field for a requested number of points
along a segment specified by ID number. It passes back location and
component in arrays. Make sure the arrays receiving data are the same
size. The side is specified according to the direction in which the segment
was drawn. For example, a vertical segment drawn from (0, 0) to (0, 1)
would have the negative x half-plane on the left and the positive x half-
plane on the right.
Get2DElectricFieldSummary_FromSegment
Analysis_Get2DElectricFieldSummary_FromSegment(int
iSegment, int iSide, ref double dFldMin, ref double dFldMax, ref
double dFldAvg, ref short iErr)
Analyzes the electric field on one side of a selected segment and reports
back the minimum, maximum and average values.
The side is specified according to the direction in which the segment was
drawn. For example, a vertical segment drawn from (0, 0) to (0, 1) would
have the negative x half-plane on the left and the positive x half-plane on
the right.
Get2DFloatingVoltage_BySegment
Analysis_Get2DFloatingVoltage_BySegment(int iSegment, out
short isFloating, out double dVoltage, ref short iErr)
Get2DFluxLinkage
Analysis_Get2DFluxLinkage(string sForwardName, string
sReturndName, ref double dFluxLinkageR, ref double dFluxLinkageI,
ref short iErr)
Get2DFluxLinkage_ByRegion
Analysis_Get2DFluxLinkage_ByRegion(int iForwardRegion, int
iReturnRegion, ref double dFluxLinkageR, ref double dFluxLinkageI,
ref short iErr)
Get2DForce
Analysis_ Get2DForce(string sName, ref double dFx, ref double
dFy, ref short iErr)
Get2DForce_ByRegion
Analysis_ Get2DForce_ByID(int iRegion, ref double dFx, ref
double dFy, ref short iErr)
Get2DMagneticField
Analysis_Get2DMagneticField(double x, double y, ref double Bxr,
ref double Bxi, ref double Byr, ref double Byi, ref short iErr)
This function reports the magnetic field at an (x, y) point. In a static model
the imaginary parts report as 0.
Get2DMagneticFields
Analysis_Get2DMagneticFields(int iNumPoints, object saXarr, object
saYarr, object saBxR, object saBxI, object saByR, object saByI, ref short
iErr)
GetBeamCenterAndDiameter
Analysis_GetBeamCenterAndDiameter(int BeamID, double
OriginX, double OriginY, double OriginZ, double NormalX, double
NormalY, double NormalZ, double UX, double UY, double UZ, int
CenterType, , int SizeType double Percent, ref double CenterX, ref
double CenterY, ref double CenterZ, ref double SpotSize, ref short
iErr)
This function reports the size and center of the beam as the circle (center,
radius) which encloses a specified percent of the beam.
UX, UY, UZ
1: RMS
2: I (Current) Percent
3: I (Current) RMS
Get2DTemperature
Analysis_Get2DTemperature(double x, double y, ref double
Temperature, ref short iErr)
This function reports the electric field at an (x,y) point. In a static model
the imaginary parts report as 0.
Get2DTorque
Analysis_ Get2DTorque(string sName, double x, double y, ref
double dTorque, ref short iErr)
Get2DTorque_ByRegion
Analysis_Get2DTorque_ByRegion(int iRegion, double x, double
y, ref double dTorque, ref short iErr)
Get the torque about a point for an object specified by its ID number.
Get2DVoltage
Analysis_Get2DVoltage(double x, double y, ref double VoltR, ref
double VoltI, ref short iErr)
GetElectricField
Analysis_GetElectricField(double x, double y, double z, ref
double Exr, ref double Exi, ref double Eyr, ref double Eyi, ref
double Ezr, ref double Ezi, ref short iErr)
Exr, Eyr, Ezr x-, y-, and z-components of the real part of the
electric field.
Exi, Eyi, Ezi x-, y-, and z-components of the imaginary part of
the electric field. In a static model these report as
0.
GetElectricFields
Analysis_GetElectricFields(int iNumPoints, object saXarr, object saYarr,
object saZarr, object saExR, object saExI, object saEyR, object saEyI,
object saEzR, object saEzI, ref short iErr)
GetElectricField_FromFile_ToFile
Analysis_GetElectricField_FromFile_ToFile(string sInFilePath,
string sOutFilePath, ref short iErr)
GetFloatingVoltage
Analysis_GetFloatingVoltage(int iFloatingNumber, out double
dVoltage, ref short iErr)
GetForce
Analysis_GetForce(string sName, ref double dFx, ref double dFy,
ref double dFz, ref short iErr)
GetForce_ByVolume
Analysis_GetForce_ByVolume(int iVolume, ref double dFx, ref
double dFy, ref double dFz, ref short iErr)
GetForceOnPointCharge_Perturbed
Analysis_GetForceOnPointCharge_Perturbed(int iPoint, double
dX, double dY, double dZ, ref double ForceX, ref double ForceY,
ref double ForceZ, ref short iErr)
GetForceOnPointCharges
Analysis_GetForceOnPointCharges(int iNumPoints, out object
saForceXArr, out object saForceYArr, out object saForceZArr, ref
short iErr)
GetMagneticField
Analysis_GetMagneticField(double x, double y, double z, ref
double Bxr, ref double Bxi, ref double Byr, ref double Byi, ref
double Bzr, ref double Bzi, ref short iErr)
Bxr, Byr, Bzr x-, y-, and z-components of the real part of the
magnetic field.
Bxi, Byi, Bzi x-, y-, and z-components of the imaginary part of
the magnetic field. In a static model these report
as 0.
GetMagneticFields
Analysis_GetMagneticFields(int iNumPoints, object saXArr, object
saYArr, object saZArr, object saBxR, object saBxI, object saByR, object
saByI, object saBzR, object saBzI, ref short iErr)
GetMagneticField_FromFile_ToFile
Analysis_GetMagneticField_FromFile_ToFile(string sOutFilePath,
string sInFilePath, ref short iErr)
GetNumberOfBeams
Analysis_GetNumberOfBeams(ref int iNumberOfBeams, ref short
iErr)
GetNumberOfEmissions
Analysis_GetNumberOfEmissions(int iBeamNumber, ref int
iNumberOfEmissions, ref short iErr)
GetNumberOfPoints
Analysis_GetNumberOfPoints(int iBeamNumber, int
iEmissionNumber, int iRayNumber, ref int iNumberOfPoints, ref
short iErr)
GetNumberOfPoints_OnStreamlines
Analysis_GetNumberOfPoints_OnStreamLine(int iStreamLine, ref
int iNumberOfPoints, ref short iErr)
GetNumberOfRayIntersectionsWithPlane
Analysis_GetNumberOfRayIntersectionsWithPlane(int iBeamID,
double dDistance, ref int iNumberOfIntersectoins, ref short iErr)
GetNumberOfRays
Analysis_GetNumberOfRays(int iBeamNumber, int
iEmissionNumber, ref int iNumberOfRays, ref short iErr)
GetNumberOfStreamlines
Analysis_GetNumberOfStreamLines(ref int
iNumberOfStreamLines, ref short iErr)
GetCoordinateTimeDistance_OnRay
Analysis_GetCoordinateTimeDistance_OnRay(int iBeamNumber,
int iEmissionNumber, int iRayNumber, int iPointNumber, ref
double dX, ref double dY, ref double dZ, ref double dTime, ref
double dDistance, ref short iErr)
GetField_OnRay
Analysis_GetPointField(int iBeamNumber, int iEmissionNumber,
int iRayNumber, int iPointNumber, ref double dEx, ref double dEy,
ref double dEz, ref double dBx, ref double dBy, ref double dBz, ref
short iErr)
GetKinematics_OnRay
Analysis_GetKinematics_OnRay(int iBeamNumber, int
iEmissionNumber, int iRayNumber, int iPointNumber, ref double
dVelocityX, ref double dVelocityY, ref double dVelocityZ, ref double
dEnergy, ref short iErr)
GetRayRadiusandCurrent
Analysis_GetRayRadiusAndCurrent(int iBeamNumber, int
iEmissionNumber, int iRayNumber, ref double dRadius, ref double
dCurrent, ref short iErr)
GetStreamlineData
Analysis_GetStreamlineData(int iStreamLine, int iNumberOfPoints,
out object saX, out object saY, out object saZ, out object saEx, out
object saEy, out object saEz, out object saMaterial, ref short iErr)
saMaterial Material
GetTemperature
Analysis_GetTemperature(double x, double y, double z, ref
double Temperature, ref short iErr)
GetTemperature_Fromfile_ToFile
Analysis_GetTemperature_FromFile_ToFile(string sInFilePath,
string sOutFilePath, ref short iErr)
GetTorque
Analysis_GetTorque(string sName, double x1, double y1, double
z1, double x2, double y2, double z2, ref double dTorque, ref short
iErr)
GetTorque_ByVolume
Analysis_GetTorque_ByVolume(int iVolume, double x1, double
y1, double z1, double x2, double y2, double z2, ref double
dTorque, ref short iErr)
GetVoltage
Analysis_GetVoltage(double x, double y, double z, ref double
VoltR, ref double VoltI, ref short iErr)
GetVoltages
Analysis_GetVoltages(int iNumPoints, object saXarr, object saYarr,
object saZarr, object saVoltR, object saVoltI, ref short iErr)
GetVoltage_FromFile_ToFile
Analysis_GetVoltage_FromFile_ToFile(string sInFilePath, string
sOutFilePath, ref short iErr)
SetBeamAxis_AlongSegments
Analysis_SetBeamAxis_AlongSegments(int iNumSegs, object
saSegs, double dOriginX, double dOriginY, double dOriginZ, ref
short iErr)
SetBeamAxis_AlongX
Analysis_SetBeamAxis_AlongX(double dOriginX, double
dOriginY, double dOriginZ, ref short iErr)
iErr
SetBeamAxis_AlongY
Analysis_SetBeamAxis_AlongY(double dOriginX, double
dOriginY, double dOriginZ, ref short iErr)
SetBeamAxis_AlongZ
Analysis_SetBeamAxis_AlongZ(double dOriginX, double
dOriginY, double dOriginZ, ref short iErr)
SetElectricStreamlinesDirection
Analysis_SetElectricStreamlinesDirection(short Direction, ref
short iErr)
SetElectricStreamlinesMaxLength
Analysis_SetElectricStreamlinesMaxLength(double dMaxLength,
ref short iErr)
SetElectricStreamlinesPrecision
Analysis_SetElectricStreamlinesPrecision(short Precision, ref
short iErr)
Precision 0 - Coarse
1 - Medium
2 - Fine
3 - Very Fine
SetElectricStreamlinesStepSize
Analysis_SetElectricStreamlinesStepSize(double dSize, ref short
iErr)
SetStreamlinesDirection
Analysis_SetStreamlinesDirection(short Direction, ref short iErr)
SetStreamlinesMaxLength
Analysis_SetStreamlinesMaxLength(double dMaxLength, ref
short iErr)
SetStreamlinesPrecision
Analysis_SetStreamlinesPrecision(short Precision, ref short iErr)
SetStreamlinesStepSize
Analysis_SetStreamlinesStepSize(double dSize, ref short iErr)
UnsetElectricStreamlinesMaxLength
Analysis_UnsetElectricStreamlinesMaxLength(ref short iErr)
UnsetElectricStreamlinesStepSize
Analysis_UnsetElectricStreamlinesStepSize(ref short iErr)
UnsetStreamLineMaxLength
Analysis_UnsetStreamlinesMaxLength(ref short iErr)
UnsetStreamLineStepSize
Analysis_UnsetStreamlinesStepSize(ref short iErr)
OBJECT
AddRegion
Object_AddRegion(string sName, int iRegion, ref short iErr)
AddSegment
Object_AddSegment(string sName, int iSegment, ref short iErr)
AddSurface
Object_AddSurface(string sName, int iSurface, ref short iErr)
AddVolume
Object_AddVolume(string sName, int iVolume, ref short iErr)
Create
Object_Create (string sName, ref int ObjId, ref short iErr)
Create_FromArray
Object_Create_FromArray(string sName, int ArrType, Object
saArrOfElems, ref int ObjId, ref short iErr)
3-SURFACE(3D)
4-VOLUME(2D, 3D).
Delete
Object_Delete(string sName, ref short iErr)
GetObjectID
Object_GetObjectID(string sName, ref int ObjId)
RemoveAll Geometry
Object_RemoveAllGeometry(string sName, ref short iErr)
RemoveRegion
Object_RemoveRegion(string sName, int iRegion, ref short iErr)
RemoveSegment
Object_RemoveSegment(string sName, int iSegment, ref short
iErr)
RemoveSurface
Object_RemoveSurface(string sName, int iSurface, ref short iErr)
RemoveVolume
Object_RemoveVolume(string sName, int iVolume, ref short iErr)
MODEL
Delete_All
Model_Delete_All()
GetAllAvailableAnalysisModes
GetCurrentAnalysisMode
Model_GetCurrentAnalysisMode(ref string sMode)
GetUnit
Model_GetUnit(string sUnitType, ref string sSelectedUnit, ref short
iErr)
This function is used to get the current unit set for a specified property
type.
sSelectedUnit The currently set unit for the property. E.g. cm, kV, etc.
SetAnalysis
Model_SetAnalysisMode(string sMode, ref short iErr)
Sets the application include the GUI and Solver to specified Mode.
SetUnit
Model_SetUnit(string sUnitType, ref string sSelectedUnit, ref short
iErr)
This function is used to set the current unit set for a specified property
type.
sSelectedUnit The currently set unit for the property. E.g. cm,
kV, etc.
VIEW
Set2DLimits
View_Set2DLimits(double dXmin, double dYmin, double dXmax,
double dYmax, ref short iErr)
GetZoomCenterRadius
View_GetZoomCenterRadius(ref double centerx, ref double
centery, ref double centerz, ref double Radius, ref short iErr)
radius radius
Set2DLimits
View_Set2DLimits(double dXmin, double dYmin, double dXmax,
double dYmax, ref short iErr)
Setdirection
View_SetDirection(double dirX, double dirY, double dirZ, ref
short iErr)
SetLimits
View_SetLimits(double dXmin, double dYmin, double dZmin,
double dXmax, double dYmax, double dZmax, ref short iErr)
SetLookatPoint
View_SetLookAtPoint(double x, double y, double z, ref short
iErr)
SetTypeHiddenLine
View_SetType_HiddenLine(ref short iErr)
SetTypeSolid
View_SetType_Solid(ref short iErr)
SetTypeSolidColorEdges
View_SetType_SolidColoredEdges(ref short iErr)
SetTypeSolidEdges
View_SetType_SolidEdges(ref short iErr)
SetTypeSolidTranslucent
View_SetType_SolidTranslucent(ref short iErr)
SetTypeTranslucent
SetTypeWireFrame
View_SetType_WireFrame(ref short iErr)
SetUpAxisX
View_SetUpAxisX(ref short iErr)
SetUpAxisY
View_SetUpAxisY(ref short iErr)
SetUpAxisZ
View_SetUpAxisX(ref short iErr)
SetZoomAllGeometry
View_SetZoomAllGeometry(ref short iErr)
SetZoomCenterRadius
View_SetZoomCenterRadius(double centerx, double centery,
double centerz, double Radius, ref short iErr)
Radius Radius
WINDOW
CheckInitialization
Window_CheckInitialization(ref short iErr)
Ver 1.0, [id(279)] This API routine should be called to test the program
readiness to run the script.
VBA
Instead of pausing for a set time:
Application.Wait (Now + TimeValue("0:00:05"))
MATLAB
Instead of:
pause(4);
Close
Window_Close()
PopupMessage
Window_PopupMessage(string sMsg)
Refresh
Window_Refresh()
Show
Window_Show()
This function activates the application frame and current view to show the
INTEGRATED program. It is not generally necessary to use this function,
but may be needed for some video cards.
ERROR CODES
The code iErr is an integer returned from the INTEGRATED program in
most API functions to indicate if there were errors executing the function.
0 means no errors.
Code Meaning
0 No errors
1 General error
CHAPTER 4
(System.Int16)
(System.Int32)
ARRAY EXAMPLES
Excel (VBA)
Following is the example showing the use of arrays in the Geometry
command to create 2D Spline from the point array.
Option Base 1
Sub ELECTRO_Demo()
Dim ret
ReDim xSp(3)
xSp(1) = 1.1
xSp(2) = 2.1
xSp(3) = 3.1
ReDim ySp(3)
ySp(1) = 1.2
ySp(2) = 2.2
ySp(3) = 3.2
End Sub
iErr Zero based index of the Error. Indicates if there were errors
executing the function.
Matlab
If you will be using array based functions with Matlab it is best to insert the
following line of code at the top of the script:
feature('COM_SafeArraySingleDim', 1);
CHAPTER 5
4) Click the [OK] button to accept the change and close the Excel
Options dialog.
A Simple Example
1) Without opening your INTEGRATED program, open Microsoft
Excel.
5) Double-click
ThisWorkbook
to open a
document.
Save your Excel test project. To do so you will need to choose a macro
enabled format.
The [Browse…]
button will open the
Add Reference
dialog. From here
navigate to your
program folder and
select the file IES.tlb.
Now when you click the button you will activate your INTEGRATED
program and change the unit to whatever is indicated in the line:
… provided that what is written in the place of unit above is valid as seen
from the length unit list in the program. Try values such as m, cm, mm,
mil etc.
Also, the code above shows a shorter pause since it is expected that your
program is already open.
Included Samples
Your INTEGRATED program includes some examples which will help you
to learn the interaction between workbook/macro/API better. These are in
the zip file shown below:
To show column F:
Next, right-click on the selection list and choose Format Control… from
the pop-up menu. You should now see the connections needed to make a
selection list like this work. In this case, the values appearing on the list
are from cells F4 to F9 and whichever is presently highlighted is shown in
cell F2. In the case shown, the second item on the list is highlighted,
therefore cell F2 shows the value 2.
There are again the type declarations for any variables used in the
API function.
A Select Case section is used to call the API with the unit
corresponding to the number read as “unit”.
Note that with all the examples the purpose is to provide basic
readable examples of using Excel to run the API. An
experienced programmer can readily provide more elegant or
efficient ways of doing the same thing. For example, you could
rewrite the code above to read the string out of the cell
“F3+number read from F2” and use that instead of the many
lines of Select Case.
The Connect Lines example in the General worksheet will read the x,y
pairs out of columns A and B, then draw lines joining them in your
INTEGRATED program (in the current Length unit).
The red boxes below are intended to highlight the fact that writing a
macro like this is mostly about knowing how to use VisualBasic,
and in particular, to use it interactively within Excel. Out of the
many lines of code, only the lines that open the program, draw the
line and refresh the view are specific to this being a macro for the
INTEGRATED API:
3) If it is empty, quit
4) If it is not empty:
o Go to step 1)
Other Examples
CHAPTER 6
This not only saves typing, it means that you only need to learn the
structure of the API function naming, you don’t need to actually
learn the function names to write your code.
In the New Project dialog specify that this is a VisualC# project, that it is a
Windows Form Application, name it API_Test and provide a folder
location.
Click the [OK] button to proceed. You will see a basic project is created
with a blank form:
In the Add Reference dialog select the [Browse] tab. Navigate to the
folder containing your INTEGRATED program, then select the file IES.tlb.
Click the [OK] button to add the reference and close the dialog.
Right-click the new IES reference and choose View in Object Browser:
As functions are selected in the top panel, the details of the variables to be
passed are shown in the bottom panel.
4) In the Properties
panel, find the text
property and edit as
shown below.
You may need to resize your button as well for the whole label to be
readable.
5) In the Design
section of the
Properties, assign
the name of the
button as
StartIntegrated.
6) Double-click the button. A new tab for the form code will be
opened up, and a function to be executed when the button is
namespace API_Test
{
public partial class Form1 : Form
{
IES.Document _Document = null;
public Form1()
{
InitializeComponent();
}
9) The program will appear as a simple form with your button. It will
look exactly like your design form inside VisualStudio. When you
click the button, your INTEGRATED program will open.
double y2 = Convert.ToDouble(this.y2.Text);
Int32 iSegNumber;
Int16 iErr;
5) Compile and run the program again (you need to have closed the
previously compiled program first).
6) Fill numbers into the boxes and click the button. Your
INTEGRATED program will start, the length unit will be set to cm,
and the corresponding line will be drawn.
OTHER EXAMPLES
Assigning voltages
Assigning materials
Naming parts
CHAPTER 7
INTRODUCTION
The link to your INTEGRATED program from Matlab is initiated by
creating a handle such as “IES” with the actxserver command:
IES = actxserver('IES.document');
The actxserver command will search your registry for IES.document to get
the information about the INTEGRATED program. If the program is
running, Matlab will attach to it and be able to set commands to it. If the
program is not running, invoking the actxserver for IES.document will start
it.
While the handle exists (IES in the case above) the program can be
controlled interactively or by Matlab. There are some dangers in using it
both ways, so it is recommended that the end of any m-file which invokes
IES.document will also clear the handle at the end (“clear IES” for the
case above).
However, the API uses “in-out” for all outputs, so the output variables
appear on the inputs list (though they have no effect). For example, in
Chapter 3 you can find this API function
The “ref” indicates in-output variables. The other variables can be used as
variables or values can be typed in. So to draw a line segment from (0, 0)
to (1, 1) the command would look like this:
[SegNumber, iErr] = Geometry_CreateLine(IES, 0, 0, 1, 1,SegNumber, iErr]
IES = actxserver('IES.document');
iErr = 1;
while iErr > 0 % pause until IES is completely initialized
[iErr] = IsApplicationInitialized(IES, iErr);
End
[SegNumber, iErr] = Geometry_CreateLine(IES, 0, 0, 1, 1,SegNumber, iErr]
clear IES
Note the “while loop” setup is a safety precaution. This will create a pause
in the Matlab script until the interface between INTEGRATED and Matlab
is completely established. If the INTEGRATED program is already
running this is normally less than a second.
Using Arrays
If you will be using array based functions with Matlab it is best to insert the
following line of code at the top of the script:
feature('COM_SafeArraySingleDim', 1);
Initial Setup
This registry entry is setup when the program is first run. If there are any
problems, then you should try one time running the program specifically
“As Administrator” from the options pulled up by right-clicking on ies.exe
in the program folder for your program. For example, here is the prompt
for setting up
methodsview(IES)
This will pop up a window showing all methods including the data types for
all inputs and outputs. Unfortunately, the variable names are not included,
so the interpretation may not be clear without referencing chapter 3 of this
manual.
solve
The magnetic part will work with AMPERES or FARADAY. For other 3D
programs the geometry will be created and the animation will run.
% the first time you use the INTEGRATED API you must setup the registry
% by right-clicking on IES.exe and selecting "Run as Administrator"
clear all;
clc;
iErr = int16(1);
SegmentNumber1 = int32(1);
SegmentNumber2 = int32(1);
SegmentNumber3 = int32(1);
SegmentNumber4 = int32(1);
SurfaceNumber = int32(1);
VolumeNumber = int32(1);
ObjID = int32(1);
NumberOfMagnets = int32(1);
time=0;
distance=0;
Lorentz = actxserver('IES.document');
iErr = 1;
while iErr > 0 % pause until Lorentz is completely initialized
[iErr] = IsApplicationInitialized(Lorentz, iErr);
end
Width = 2;
Thickness = 2;
Length = 20;
Separation = 5;
StartAngle = 90;
Rotation = 90;
Number = 9;
z1 = Separation / 2;
z2 = z1 + Thickness;
x1 = Length / 2;
x2 = -Length / 2;
y1 = -Width * Number / 2;
y2 = y1 + Width;
NumberOfMagnets = 9;
% set Material
[iErr] = Physics_SetMaterial(Lorentz, 'Magnets', 'Neodymium 45 MGOe
Sintered', iErr);
[iErr] = Physics_SetMagnetizationDirection_ByVolume(Lorentz,
VolumeNumber, 0, cos(Angle), sin(Angle), iErr);
% bottom magnets
[VolumeNumber, iErr] = Geometry_GetVolume_FromPoint(Lorentz, x1,
y1, -z1, VolumeNumber, iErr);
[iErr] = Physics_SetMagnetizationDirection_ByVolume(Lorentz,
VolumeNumber, 0, -cos(Angle), sin(Angle), iErr);
end
% rotate the view
x = 0;
y = 0;
z = 0;
for i = 0 : 50
R = 10 - 2 * sin(i * pi / 360);
Theta = i * 1;
dirZ = 0.6 + 0.4 * sin(i * pi / 180);
dirY = sin(Theta * pi / 180);
dirX = cos(Theta * pi / 180);
[iErr] = View_SetDirection(Lorentz, dirX, dirY, dirZ, iErr);
[iErr] = View_SetZoomCenterRadius(Lorentz, x, y, z, R, iErr);
pause(0.01);
end
% launch electron
% setup point sources and solve
[iErr] = Model_SetAnalysisMode(Lorentz, 'Trajectory', iErr);
[iErr] = Physics_CreatePointEmitter(Lorentz, 'Points', iErr);
x = 0;
y = 0;
z = 0;
[iErr] = View_SetType_SolidTranslucent(Lorentz, iErr);
for i = 0 : 250
R = 10 - 2 * sin(i * pi / 360);
Theta = i * 1;
DirZ = 0.6 + 0.4 * sin(i * pi / 180);
dirY = sin(Theta * pi / 180);
dirX = cos(Theta * pi / 180);
[iErr] = View_SetDirection(Lorentz, dirX, dirY, DirZ, iErr);
[iErr] = View_SetZoomCenterRadius(Lorentz, x, y, z, R, iErr);
pause(0.04);
end
% uncomment or paste into Matlab to see all the LORENTZ API methods
% methodsview(Lorentz)
OTHER EXAMPLES
Your installed program contains a folder called API. This folder contains a
zip file with example projects in Excel, VisualStudio, and Matlab. Copy
this zip to a folder where you have read/write permission and unzip it
there. You can then copy the Matlab examples to your normal working
Matlab folders.