|
Programming Reference for VirtualLab Fusion
2022.1
|
This class provides methods for interacting with the VirtualLab main window. More...
Static Public Member Functions | |
| static Complex | AskForComplex (Complex defaultValue=new Complex(), string dialogCaption="Enter Complex Number") |
| Opens a dialog to enter a complex number. More... | |
| static double | AskForDouble (double defaultValue=0, string dialogCaption="Enter Floating Point Number", string name="Value", double minimumValue=double.NegativeInfinity, double maximumValue=double.PositiveInfinity, PhysicalProperty physicalProperty=PhysicalProperty.NoUnit) |
| Opens a dialog to enter a floating point number in double precision. More... | |
| static int | AskForInteger (int defaultValue=0, string dialogCaption="Enter Integer", string name="Value") |
| Opens a dialog to enter an integer number. More... | |
| static void | CreateAnimationFromDataArray (DataArray2D dataArray, FieldQuantity fieldQuantity=FieldQuantity.RealPart, PredefinedColorLookupTableType? colorLookupTable=null) |
| Creates an animation from the given data array and shows it as separate document. More... | |
| static DataArray1D | GetLastActiveDataArray1D (int index=0) |
| With this method you can copy a one-dimensional data array from a data array view already opened in VirtualLab. By default, the most recently activated data array view is used to this end. More... | |
| static DataArray2D | GetLastActiveDataArray2D (int index=0) |
| With this method you can copy a two-dimensional gridded data array from a data array view already opened in VirtualLab. By default, the most recently activated data array view is used to this end. More... | |
| static ComplexAmplitude | GetLastActiveField (int index=0) |
| With this method you can copy a harmonic field from a harmonic field view already opened in VirtualLab. By default, the most recently activated field view is used to this end. More... | |
| static HarmonicFieldsSet | GetLastActiveFieldsSet (int index=0) |
| With this method you can copy a harmonic fields set from a harmonic fields set view already opened in VirtualLab. By default, the most recently activated fields set view is used to this end. More... | |
| static RayDistribution | GetLastActiveRayDistribution (int index=0) |
| With this method you can copy a (two-dimensional) ray distribution from a ray distribution view already opened in VirtualLab. By default, the most recently activated ray distribution view is used to this end. More... | |
| static DataArray1D | SelectOpenDataArray1D (string caption="Select Data Array 1D") |
| This method opens a dialog where all currently open one-dimensional data arrays are listed. You can select any of these documents. More... | |
| static DataArray2D | SelectOpenDataArray2D (string caption="Select Data Array 2D") |
| This method opens a dialog where all currently open two-dimensional gridded data arrays are listed. You can select any of these documents. More... | |
| static ComplexAmplitude | SelectOpenField (string caption="Select Field") |
| This method opens a dialog where all currently open harmonic field documents are listed. You can select any of these documents. More... | |
| static HarmonicFieldsSet | SelectOpenFieldsSet (string caption="Select Fields Set") |
| This method opens a dialog where all currently open harmonic field documents are listed. You can select any of these documents. More... | |
| static ComplexAmplitude | SelectOpenTransmission (string caption="Select Transmission") |
| This method opens a dialog where all currently open transmission documents are listed. You can select any of these documents. More... | |
| static void | ShowDocument (IDocument document, string windowCaption="") |
| Shows a document (e. g. a ComplexAmplitude or a HarmonicFieldsSet object) in the VirtualLab main window. More... | |
| static DialogResult | ShowWindowsStandardDialog (CommonDialog dialog) |
| Shows a Windows™ standard dialog, most notably the OpenFileDialog, but also SaveFileDialog, FolderBrowserDialog, and ColorDialog can be used. All these dialogs can be found in the System.Windows.Forms namespace. Opening these dialogs directly does not work and will make VirtualLab Fusion crash! More... | |
| static void | WriteLineToMessagesTab (string message, bool addTimeStamp=false) |
| Writes a string as a separate line into the Messages tab of VirtualLab. More... | |
| static void | WriteToMessagesTab (string message) |
| Writes a string into the Messages tab of VirtualLab. In contrast to the WriteLineToMessagesTab method, this method does not introduce a line break. More... | |
This class provides methods for interacting with the VirtualLab main window.
|
static |
Opens a dialog to enter a complex number.
| defaultValue | Optional parameter to specify the Complex number preset in the dialog. Zero by default. |
| dialogCaption | Optional parameter to specify the caption of the dialog. "Enter Complex Number" by default. |
true in that case.
|
static |
Opens a dialog to enter a floating point number in double precision.
| defaultValue | Optional parameter to specify the double number preset in the dialog. Zero by default. |
| dialogCaption | Optional parameter to specify the caption of the dialog. "Enter Floating Point Number" by default. |
| name | The name of the value, for example "Wavelength". If this optional parameter is not specified, "Value" is taken as default. |
| minimumValue | Optional parameter to specify the minimum value the user can enter. For example 1e-9. |
| maximumValue | Optional parameter to specify the minimum value the user can enter. For example 1e-6. |
| physicalProperty | Optional parameter to specify the physical property of the value to enter, for example PhysicalProperty.Length. |
true in that case.
|
static |
Opens a dialog to enter an integer number.
| defaultValue | Optional parameter to specify the integer number preset in the dialog. Zero by default. |
| dialogCaption | Optional parameter to specify the caption of the dialog. "Enter Integer" by default. |
| name | The name of the value, for example "Number of Iterations". If this optional parameter is not specified, "Value" is taken as default. |
|
static |
Creates an animation from the given data array and shows it as separate document.
| dataArray | The data array to show as animation. It must contain at least two subsets. |
| fieldQuantity | The field quantity to show for complex-valued data arrays. If this parameter is not specified, the real part is shown. |
| colorLookupTable | Enumeration specifying which of the predefined color look up tables shall be used. If this parameter is not specified the Default Color Lookup Table as defined in the Global Options dialog is used. |
|
static |
With this method you can copy a one-dimensional data array from a data array view already opened in VirtualLab. By default, the most recently activated data array view is used to this end.
| index | If this optional index is not specified or if it is zero, the most recently activated one-dimensional data array is returned. If it is 1 you get the data array which was activated before the most recently activated data array and so on. |
null if no matching data array view is opened in VirtualLab.
|
static |
With this method you can copy a two-dimensional gridded data array from a data array view already opened in VirtualLab. By default, the most recently activated data array view is used to this end.
| index | If this optional index is not specified or if it is zero, the most recently activated two-dimensional data array is returned. If it is 1 you get the data array which was activated before the most recently activated data array and so on. |
null if no matching data array view is opened in VirtualLab.
|
static |
With this method you can copy a harmonic field from a harmonic field view already opened in VirtualLab. By default, the most recently activated field view is used to this end.
| index | If this optional index is not specified or if it is zero, the most recently activated field is returned. If it is 1 you get the field which was activated before the most recently activated field and so on. |
null if no harmonic field view is opened in VirtualLab.
|
static |
With this method you can copy a harmonic fields set from a harmonic fields set view already opened in VirtualLab. By default, the most recently activated fields set view is used to this end.
| index | If this optional index is not specified or if it is zero, the most recently activated fields set is returned. If it is 1 you get the fields set which was activated before the most recently activated fields set and so on. |
null if no harmonic fields set view is opened in VirtualLab.
|
static |
With this method you can copy a (two-dimensional) ray distribution from a ray distribution view already opened in VirtualLab. By default, the most recently activated ray distribution view is used to this end.
| index | If this optional index is not specified or if it is zero, the most recently activated two-dimensional ray distribution is returned. If it is 1 you get the ray distribution which was activated before the most recently activated ray distribution and so on. |
null if no matching ray distribution view is opened in VirtualLab.
|
static |
This method opens a dialog where all currently open one-dimensional data arrays are listed. You can select any of these documents.
| caption | Optional caption of the dialog. "Select Data Array 1D" by default. |
null if you no matching data array was available or the dialog was canceled.
|
static |
This method opens a dialog where all currently open two-dimensional gridded data arrays are listed. You can select any of these documents.
| caption | Optional caption of the dialog. "Select Data Array 2D" by default. |
null if you no matching data array was available or the dialog was canceled.
|
static |
This method opens a dialog where all currently open harmonic field documents are listed. You can select any of these documents.
| caption | Optional caption of the dialog. "Select Field" by default. |
null if you no field was available or the dialog was canceled.
|
static |
This method opens a dialog where all currently open harmonic field documents are listed. You can select any of these documents.
| caption | Optional caption of the dialog. "Select Fields Set" by default. |
null if no fields set was available or the dialog was canceled.
|
static |
This method opens a dialog where all currently open transmission documents are listed. You can select any of these documents.
| caption | Optional caption of the dialog. "Select Transmission" by default. |
null if you no transmission was available or the dialog was canceled.
|
static |
Shows a document (e. g. a ComplexAmplitude or a HarmonicFieldsSet object) in the VirtualLab main window.
| document | The document to show. |
| windowCaption | The optional caption of the document window to be created. |
|
static |
Shows a Windows™ standard dialog, most notably the OpenFileDialog, but also SaveFileDialog, FolderBrowserDialog, and ColorDialog can be used. All these dialogs can be found in the System.Windows.Forms namespace. Opening these dialogs directly does not work and will make VirtualLab Fusion crash!
| dialog | The dialog to show, preconfigured to your needs. |
|
static |
Writes a string as a separate line into the Messages tab of VirtualLab.
| message | The string to write into the Messages tab. |
| addTimeStamp | If this optional parameter is set to true the string is prepended with the current time. |
|
static |
Writes a string into the Messages tab of VirtualLab. In contrast to the WriteLineToMessagesTab method, this method does not introduce a line break.
| message | The string to write into the Messages tab. |