Femtet2026.0マクロヘルプ/マニュアル
 

ホーム / 計算結果の抽出 / CGogh / 関数 / IntegralAtBodyByBodyAttribute

IntegralAtBodyByBodyAttribute関数

定義

IntegralAtBodyByBodyAttribute(volName As String, Func As Long, Result As CComplex) As Boolean

戻り値

True   成功
False   失敗

引数

volName   積分を行うソリッドボディのBodyAttribute名
Func   積分値を計算する被積分関数のアドレス(アドレス取得法
アドレスとはプロシージャーを識別する整数値です。
積分Subプロシージャ例はこちら
Result   積分結果

解説

指定したBodyAttribute名のソリッドボディで、被積分関数で計算される値の積分を行います。

実行例

Dim Femtet As New CFemtet
Dim Result As New CComplex

'プロジェクトを開く
If Femtet.LoadProject("C:\test\test.femprj", True) = False Then
    Femtet.ShowLastError
End If

'計算結果を開く
If Femtet.OpenPDT("C:\test\test.pdt") = False Then
    Femtet.ShowLastError
End If

'積分
If Femtet.Gogh.IntegralAtBodyByBodyAttribute("volName", AddressOf IntegralSub, Result) = False Then
    Femtet.ShowLastError
End If

'結果表示
MsgBox Result.Real, vbInformation, "Real"
MsgBox Result.Imag, vbInformation, "Imag"