美文网首页程序园
microstation二次开发之创建长方体

microstation二次开发之创建长方体

作者: 清风明月永相随 | 来源:发表于2019-07-09 21:03 被阅读13次

长方体创建的接口说明


CreateSlab (Template, width, length, height)

width double类型 宽度

length double类型 长度

height double类型 高度 

Template 元素模板. 

窗体设计

窗体设计

程序代码


Sub main()

  Form1.Show

End Sub

Private Sub CommandButton1_Click()

    Dim length, width, height As Double

    Dim solid As SmartSolidElement


   '长度
    length = Val(TextBox1.Value)
   '宽度
    width = Val(TextBox2.Value)
   '高度
    height = Val(TextBox3.Value)


    '创建长方体
    Set solid = SmartSolid.CreateSlab(Nothing, width, length, height)
    '添加至模型空间
    ActiveModelReference.AddElement solid

End Sub

运行效果

运行效果

相关文章

网友评论

    本文标题:microstation二次开发之创建长方体

    本文链接:https://www.haomeiwen.com/subject/roafkctx.html