例(カスタムダイアログ)

フォームダイアログの作成方法を示す簡単な例を取りあげます。

このスクリプトでは、Sパラメータ結果とグラフタイトルを要求します。新しいSmith chartに結果がプロットされます。
app = pf.GetApplication()
-- ...
form = pf.Form.New("Simple Form Dialog") -- Create the dialog

-- Create the dialog's items
spResultSelector = pf.FormDataSelector.New("Select an S-parameter result", 
                                            pf.Enums.FormDataSelectorType.SParameter)

lineEdit = pf.FormLineEdit.New("The title of the chart")
lineEdit.Value = "Smith Chart"

-- Add the items to the dialog
form:Add(spResultSelector)
form:Add(lineEdit)
form:Run() -- Run the dialog

-- Extract and use the chosen values
smithChart = app.SmithCharts:Add()
smithChart.Title.Text = lineEdit.Value
smithChart.Traces:Add(spResultSelector.Value)
-- ...
Figure 1に示すスクリプト実行結果が表示されます(Feko Getting Started Guideにある“ホーン”モデルを使用して実行した結果)。


Figure 1. 簡単なフォームダイアログの例。
Tip: フォームダイアログに使用可能なオブジェクト、プロパティ、およびメソッドの詳細については、APIリファレンスのFormFormItemを参照してください。