円錐を配置する方法を紹介します。
Option Explicit Sub Main() Dim oCone As SmartSolidElement Set oCone = SmartSolid.CreateCone(Nothing, 2#, 10#, 15#) ActiveModelReference.AddElement oCone End Sub
円錐を配置するには、スマートソリッドオブジェクトを利用する必要がありますのでoSphereを定義します。次にSmartSolid.CreateConeメソッドを呼び出し、パラメータを渡してからActiveModelReference.AddElementで円錐が配置できます。
Set SmartSolidElement = object.CreateCone (Template, topRadius, baseRadius, height)
Part Description object A valid object. topRadius A Double expression. radius of top plan. baseRadius A Double expression. radius of base plan. Template An Element expression. height A Double expression.