# SourceCollection

A collection of solution sources.

## Example

application = cf.Application.GetInstance()
project = application:NewProject()

-- Add a plane wave and an electric dipole to the source collection

sourceCollection = project.Contents.SolutionConfigurations.GlobalSources

-- Remove the plane wave and electric dipole from the source collection

sourceCollection:Item(planeWave.Label):Delete()
electricDipole:Delete()

## Inheritance

The SourceCollection object is derived from the AbstractModifiableCollection object.

## Usage locations

The SourceCollection object can be accessed from the following locations:

## Property List

BoundingBox
A box indicating the bounding box of this entity. (Read only Box). (Read only Box)
Count
The number of Source items in the collection. (Read only number)
Label
Type
The object type string. (Read only string)

## Method List

Create a current source using the table of properties. (Returns a CurrentSource object.)
Create a current source on the specified FEM line port terminal. (Returns a CurrentSource object.)
Create an electric dipole source using the table of properties. (Returns a ElectricDipole object.)
AddElectricDipole (position Point, theta Expression, phi Expression)
Create an electric dipole. (Returns a ElectricDipole object.)
Create a FEM modal source using the table of properties. (Returns a FEMModalSource object.)
Create a FEM modal source on the specified terminal. (Returns a FEMModalSource object.)
Create a far field source using the table of properties. (Returns a FarFieldSource object.)
Create a far field source from the specified field data. (Returns a FarFieldSource object.)
Create an impressed current. (Returns a ImpressedCurrent object.)
Create an impressed current. (Returns a ImpressedCurrent object.)
Create a magnetic dipole source using the table of properties. (Returns a MagneticDipole object.)
AddMagneticDipole (position Point, theta Expression, phi Expression)
Create a magnetic dipole. (Returns a MagneticDipole object.)
Create a near field source using the table of properties. (Returns a NearFieldSource object.)
Create a near field source from the specified field data. (Returns a NearFieldSource object.)
Create a PCB source using the table of properties. (Returns a PCBSource object.)
Create a PCB source from the specified field data. (Returns a PCBSource object.)
Create a plane wave using the table of properties. (Returns a PlaneWave object.)
Create a plane wave. (Returns a PlaneWave object.)
Create a solution coefficient source using the table of properties. (Returns a SolutionCoefficientSource object.)
Create a solution coefficient source from the specified field data. (Returns a SolutionCoefficientSource object.)
Create a spherical modes source using the table of properties. (Returns a SphericalModeSource object.)
Create a spherical modes source from the specified field data. (Returns a SphericalModeSource object.)
Create a voltage source using the table of properties. (Returns a VoltageSource object.)
Create a voltage source on the specified terminal. (Returns a VoltageSource object.)
Create a waveguide source using the table of properties. (Returns a WaveguideSource object.)
Create a waveguide source on the specified waveguide port terminal. (Returns a WaveguideSource object.)
Delete ()
Deletes the entity.
Duplicate ()
Duplicates the entity. (Returns a Object object.)
GetProperties ()
Returns a table of properties representing the state of the object. The properties table can be used with the SetProperties method to change multiple properties of the object in one step. (Returns a table object.)
Item (index number)
Returns the Source for the given index in the collection. (Returns a Source object.)
Item (label string)
Returns the Source for the given label in the collection. (Returns a Source object.)
Items ()
Returns a table of Source items. (Returns a UnsupportedType(List of Source) object.)
SetProperties (properties Object)
Modifies the state of the object using the provided table of properties. This method is used to modify multiple properties of the object in a single step.

## Static Function List

GetDefaultProperties ()
Creates a table containing the default settings to create an object. (Returns a table object.)

## Property Details

BoundingBox
A box indicating the bounding box of this entity. (Read only Box).
Type
Box
Access
Count
The number of Source items in the collection.
Type
number
Access
Label
The object label.
Type
string
Access
Type
The object type string.
Type
string
Access

## Method Details

Create a current source using the table of properties.
Input Parameters
properties(table)
The table of properties.
Return
CurrentSource
The current source.
Create a current source on the specified FEM line port terminal.
Input Parameters
portterminal(FEMLinePort)
The FEM line port terminal on which the current source should be created.
Return
CurrentSource
The current source.
Create an electric dipole source using the table of properties.
Input Parameters
properties(table)
The table of properties.
Return
ElectricDipole
The electric dipole source.
AddElectricDipole (position Point, theta Expression, phi Expression)
Create an electric dipole.
Input Parameters
position(Point)
The dipole position.
theta(Expression)
The theta orientation angle (degrees).
phi(Expression)
The phi orientation angle (degrees).
Return
ElectricDipole
The electric dipole source.
Create a FEM modal source using the table of properties.
Input Parameters
properties(table)
The table of properties.
Return
FEMModalSource
The FEM modal source.
Create a FEM modal source on the specified terminal.
Input Parameters
portterminal(FEMModalPort)
The FEM modal port terminal on which the FEM modal source should be created.
Return
FEMModalSource
The FEM modal source.
Create a far field source using the table of properties.
Input Parameters
properties(table)
The table of properties.
Return
FarFieldSource
The far field source.
Create a far field source from the specified field data.
Input Parameters
fielddata(FarFieldData)
The field data that defines the radiation pattern.
Return
FarFieldSource
The far field source.
Create an impressed current.
Input Parameters
properties(table)
The table of properties.
Return
ImpressedCurrent
The impressed current.
Create an impressed current.
Input Parameters
start(Point)
The segment current start point.
end(Point)
The segment current end point.
Return
ImpressedCurrent
The impressed current.
Create a magnetic dipole source using the table of properties.
Input Parameters
properties(table)
The table of properties.
Return
MagneticDipole
The magnetic dipole source.
AddMagneticDipole (position Point, theta Expression, phi Expression)
Create a magnetic dipole.
Input Parameters
position(Point)
The dipole position.
theta(Expression)
The theta orientation angle (degrees).
phi(Expression)
The phi orientation angle (degrees).
Return
MagneticDipole
The magnetic dipole.
Create a near field source using the table of properties.
Input Parameters
properties(table)
The table of properties.
Return
NearFieldSource
The near field source.
Create a near field source from the specified field data.
Input Parameters
fielddata(FieldData)
The field data that defines the near field source.
Return
NearFieldSource
The near field source.
Create a PCB source using the table of properties.
Input Parameters
properties(table)
The table of properties.
Return
PCBSource
The PCB source.
Create a PCB source from the specified field data.
Input Parameters
fielddata(FieldData)
The field data that defines the PCB.
Return
PCBSource
The PCB source.
Create a plane wave using the table of properties.
Input Parameters
properties(table)
The table of properties.
Return
PlaneWave
The plane wave.
Create a plane wave.
Input Parameters
theta(Expression)
The theta direction (degrees).
phi(Expression)
The phi direction (degrees).
Return
PlaneWave
The plane wave.
Create a solution coefficient source using the table of properties.
Input Parameters
properties(table)
The table of properties.
Return
SolutionCoefficientSource
The solution coefficient source.
Create a solution coefficient source from the specified field data.
Input Parameters
fielddata(FieldData)
The field data that defines the solution coefficient.
Return
SolutionCoefficientSource
The solution coefficient source.
Create a spherical modes source using the table of properties.
Input Parameters
properties(table)
The table of properties.
Return
SphericalModeSource
The spherical modes source.
Create a spherical modes source from the specified field data.
Input Parameters
fielddata(FieldData)
The field data that defines the spherical modes.
Return
SphericalModeSource
The spherical modes source.
Create a voltage source using the table of properties.
Input Parameters
properties(table)
The table of properties.
Return
VoltageSource
The voltage source.
Create a voltage source on the specified terminal.
Input Parameters
portterminal(Port)
The terminal on which the voltage source should be created.
Return
VoltageSource
The voltage source.
Create a waveguide source using the table of properties.
Input Parameters
properties(table)
The table of properties.
Return
WaveguideSource
The waveguide source.
Create a waveguide source on the specified waveguide port terminal.
Input Parameters
portterminal(WaveguidePort)
The waveguide port terminal on which the waveguide source should be created.
Return
WaveguideSource
The waveguide source.
Delete ()
Deletes the entity.
Duplicate ()
Duplicates the entity.
Return
Object
The new (duplicated) entity.
GetProperties ()
Returns a table of properties representing the state of the object. The properties table can be used with the SetProperties method to change multiple properties of the object in one step.
Return
table
A table defining the properties.
Item (index number)
Returns the Source for the given index in the collection.
Input Parameters
index(number)
The index of the Source.
Return
Source
The item in the collection
Item (label string)
Returns the Source for the given label in the collection.
Input Parameters
label(string)
The label of the Source.
Return
Source
The item in the collection
Items ()
Returns a table of Source items.
Return
UnsupportedType(List of Source)
The list of items in the collection
SetProperties (properties Object)
Modifies the state of the object using the provided table of properties. This method is used to modify multiple properties of the object in a single step.
Input Parameters
properties(Object)
A table of properties defining the new state of the object.

## Static Function Details

GetDefaultProperties ()
Creates a table containing the default settings to create an object.
Return
table
A table containing the default properties.