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

ホーム / モデリング / CGaudiBody / プロパティ / Vertex

Vertexプロパティ

定義

Vertex(Index As Long) As CGaudiVertex
値の取得  
値の設定   ×

引数

Index   CGaudiBodyが持つVertexのインデックス

解説

CGaudiBodyの指定されたインデックスの位置にあるCGaudiVertexを取得します。
IndexがCGaudiBodyに存在する数を超える値を入れた場合エラーが発生し、マクロがストップします。
またID(GetEdgeByIDGetVertexByID関数を使用)からも取得できます。

実行例

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.X =0
Point.Y =0
Point.Z =0

Set Body =Gaudi.CreateBox (Point,3,3,5)

MsgBox "X :"&Body.Vertex (2).Point.X &Chr (13)& _
"Y :"&Body.Vertex (2).Point.Y &Chr (13)& _
"Z :"&Body.Vertex(2).Point.Z,vbInformation,"インデックス2 の座標値"