| プロダクト: | MicroStation | ||
| バージョン: | CONNECT | ||
| 環境: | N/A | ||
| エリア: | Programming | ||
| サブエリア: | MVBA |
円柱を配置する方法を紹介します。
Option Explicit
Sub Main()
Dim oCylinder As SmartSolidElement
Set oCylinder = SmartSolid.CreateCylinder(Nothing, 5#, 10#)
ActiveModelReference.AddElement oCylinder
End Sub
円柱を配置するには、スマートソリッドオブジェクトを利用する必要がありますのでoCylinderを定義します。
次にSmartSolid.CreateCylinderメソッドを呼び出し、パラメータを渡してからActiveModelReference.AddElementで円柱が配置できます。
CreateCylinderメソッドの説明は下記となります:
Set SmartSolidElement = object.CreateCylinder (Template, radius, height)
Part Description
object:A valid object.
radius:A Double expression. radius of base plan.
height:A Double expression. height of the cylinder.
Template:An Element expression.