球を配置する方法を紹介します。
Option Explicit Sub Main() Dim oSphere As SmartSolidElement Set oSphere = SmartSolid.CreateSphere(Nothing, 10#) ActiveModelReference.AddElement oSphere End Sub
球を配置するには、スマートソリッドオブジェクトを利用する必要がありますのでoSphereを定義します。次にSmartSolid.CreateSphereメソッドを呼び出し、パラメータを渡してからActiveModelReference.AddElementで球が配置できます。
CreateSphereメソッドの説明は下記となります:Set SmartSolidElement = object.CreateSphere (Template, radius)
object:A valid object. radius:A Double expression. radius of the sphere. Template:An Element expression.