想要在BIMBase SDK环境下实现自己的功能吗?在工程中添加如下代码,即可在BIMBase中注册自己的命令,实现弹出Hello BIMBase对话框。
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Windows.Forms;
using BIMBaseCS.UI;
using BIMBaseCS.Attributes;
namespace APIDemo
{
[BPExternalCommandAttribute(name = "HelloBIMBase")]
public class HelloCommand : IBPFunctionCommand
{
public override void onExcute(BPCommandContext context)
{
MessageBox.Show("Hello BIMBase!");
base.onExcute(context);
}
}
}
代码1-1 "HelloBIMBase"

图1-1 “Hello BIMBase”对话框