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
planeWave = sourceCollection:AddPlaneWave(0,0)
electricDipole = sourceCollection:AddElectricDipole(cf.Point(0,0,0),0,0)

    -- 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 Object 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
The object label. (Read/Write string)
Type
The object type string. (Read only string)

Method List

AddCurrentSource (properties table)
Create a current source using the table of properties. (Returns a CurrentSource object.)
AddCurrentSource (portterminal FEMLinePort)
Create a current source on the specified FEM line port terminal. (Returns a CurrentSource object.)
AddElectricDipole (properties table)
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.)
AddFEMModalSource (properties table)
Create a FEM modal source using the table of properties. (Returns a FEMModalSource object.)
AddFEMModalSource (portterminal FEMModalPort)
Create a FEM modal source on the specified terminal. (Returns a FEMModalSource object.)
AddFarFieldSource (properties table)
Create a far field source using the table of properties. (Returns a FarFieldSource object.)
AddFarFieldSource (fielddata FarFieldData)
Create a far field source from the specified field data. (Returns a FarFieldSource object.)
AddImpressedCurrent (properties table)
Create an impressed current. (Returns a ImpressedCurrent object.)
AddImpressedCurrent (start Point, end Point, radius Expression)
Create an impressed current. (Returns a ImpressedCurrent object.)
AddMagneticDipole (properties table)
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.)
AddNearFieldSource (properties table)
Create a near field source using the table of properties. (Returns a NearFieldSource object.)
AddNearFieldSource (fielddata FieldData)
Create a near field source from the specified field data. (Returns a NearFieldSource object.)
AddPCBSource (properties table)
Create a PCB source using the table of properties. (Returns a PCBSource object.)
AddPCBSource (fielddata FieldData)
Create a PCB source from the specified field data. (Returns a PCBSource object.)
AddPlaneWave (properties table)
Create a plane wave using the table of properties. (Returns a PlaneWave object.)
AddPlaneWave (theta Expression, phi Expression)
Create a plane wave. (Returns a PlaneWave object.)
AddSolutionCoefficientSource (properties table)
Create a solution coefficient source using the table of properties. (Returns a SolutionCoefficientSource object.)
AddSolutionCoefficientSource (fielddata FieldData)
Create a solution coefficient source from the specified field data. (Returns a SolutionCoefficientSource object.)
AddSphericalModeSource (properties table)
Create a spherical modes source using the table of properties. (Returns a SphericalModeSource object.)
AddSphericalModeSource (fielddata FieldData)
Create a spherical modes source from the specified field data. (Returns a SphericalModeSource object.)
AddVoltageSource (properties table)
Create a voltage source using the table of properties. (Returns a VoltageSource object.)
AddVoltageSource (portterminal Port)
Create a voltage source on the specified terminal. (Returns a VoltageSource object.)
AddWaveguideSource (properties table)
Create a waveguide source using the table of properties. (Returns a WaveguideSource object.)
AddWaveguideSource (portterminal WaveguidePort)
Create a waveguide source on the specified waveguide port terminal. (Returns a WaveguideSource object.)
Contains (label string)
Checks if the collection contains an item with the given label. (Returns a boolean 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.
UniqueName (label string)
Generates a unique name base of the provided base name. If the base name already exists in the collection, a digit will be appended until a valid name is generated. (Returns a string object.)

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
Read only
Count
The number of Source items in the collection.
Type
number
Access
Read only
Label
The object label.
Type
string
Access
Read/Write
Type
The object type string.
Type
string
Access
Read only

Method Details

AddCurrentSource (properties table)
Create a current source using the table of properties.
Input Parameters
properties(table)
The table of properties.
Return
CurrentSource
The current source.
AddCurrentSource (portterminal FEMLinePort)
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.
AddElectricDipole (properties table)
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.
AddFEMModalSource (properties table)
Create a FEM modal source using the table of properties.
Input Parameters
properties(table)
The table of properties.
Return
FEMModalSource
The FEM modal source.
AddFEMModalSource (portterminal FEMModalPort)
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.
AddFarFieldSource (properties table)
Create a far field source using the table of properties.
Input Parameters
properties(table)
The table of properties.
Return
FarFieldSource
The far field source.
AddFarFieldSource (fielddata FarFieldData)
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.
AddImpressedCurrent (properties table)
Create an impressed current.
Input Parameters
properties(table)
The table of properties.
Return
ImpressedCurrent
The impressed current.
AddImpressedCurrent (start Point, end Point, radius Expression)
Create an impressed current.
Input Parameters
start(Point)
The segment current start point.
end(Point)
The segment current end point.
radius(Expression)
The impressed current radius.
Return
ImpressedCurrent
The impressed current.
AddMagneticDipole (properties table)
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.
AddNearFieldSource (properties table)
Create a near field source using the table of properties.
Input Parameters
properties(table)
The table of properties.
Return
NearFieldSource
The near field source.
AddNearFieldSource (fielddata FieldData)
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.
AddPCBSource (properties table)
Create a PCB source using the table of properties.
Input Parameters
properties(table)
The table of properties.
Return
PCBSource
The PCB source.
AddPCBSource (fielddata FieldData)
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.
AddPlaneWave (properties table)
Create a plane wave using the table of properties.
Input Parameters
properties(table)
The table of properties.
Return
PlaneWave
The plane wave.
AddPlaneWave (theta Expression, phi Expression)
Create a plane wave.
Input Parameters
theta(Expression)
The theta direction (degrees).
phi(Expression)
The phi direction (degrees).
Return
PlaneWave
The plane wave.
AddSolutionCoefficientSource (properties table)
Create a solution coefficient source using the table of properties.
Input Parameters
properties(table)
The table of properties.
Return
SolutionCoefficientSource
The solution coefficient source.
AddSolutionCoefficientSource (fielddata FieldData)
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.
AddSphericalModeSource (properties table)
Create a spherical modes source using the table of properties.
Input Parameters
properties(table)
The table of properties.
Return
SphericalModeSource
The spherical modes source.
AddSphericalModeSource (fielddata FieldData)
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.
AddVoltageSource (properties table)
Create a voltage source using the table of properties.
Input Parameters
properties(table)
The table of properties.
Return
VoltageSource
The voltage source.
AddVoltageSource (portterminal Port)
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.
AddWaveguideSource (properties table)
Create a waveguide source using the table of properties.
Input Parameters
properties(table)
The table of properties.
Return
WaveguideSource
The waveguide source.
AddWaveguideSource (portterminal WaveguidePort)
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.
Contains (label string)
Checks if the collection contains an item with the given label.
Input Parameters
label(string)
The label of the item.
Return
boolean
The success of the check.
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.
UniqueName (label string)
Generates a unique name base of the provided base name. If the base name already exists in the collection, a digit will be appended until a valid name is generated.
Input Parameters
label(string)
The base name.
Return
string
The generated unique name label for the item.

Static Function Details

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