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

ホーム / モデリング / CGaudiEdge / 関数 / ChangeBoundary

ChangeBoundary関数

定義

ChangeBoundary(oldName As String, newName As String ) As Boolean

戻り値

True   成功
False   失敗

引数

oldName   変更前の境界条件名
newName   変更後の新しい境界条件名

解説

境界条件名を変更します。変更に失敗したらFalseを返します。

実行例

Dim Femtet As New CFemtet
Dim Gaudi As CGaudi
Dim Body As CGaudiBody
Dim point As New CGaudiPoint

'新規プロジェクト作成
If Femtet.OpenNewProject() = False Then
    Femtet.ShowLastError
End If

'Femtet.Gaudiを変数Gaudiに代入して使いやすくする
Set Gaudi = Femtet.Gaudi



point.SetCoord 0, 0, 0
Set Body = Gaudi.CreateBox(point, 10, 10, 10)

'境界条件の設定
Body.GetEdgeByID(25).AddBoundary "境界条件名-Old"

'境界条件名の変更
If Body.GetEdgeByID(25).ChangeBoundary ("境界条件名-Old", "境界条件名-New") = False Then
    Femtet.ShowLastError
End If