创建选择对话框选择体

    private static Selection.Response select_a_body(ref NXOpen.Tag body)
    {

        //Part workPart = theSession.Parts.Work;
        //Part displyPart = theSession.Parts.Display;
        string message = "Hello";//信息
        string title = "Select a body";//标题
        int scope = UFConstants.UF_UI_SEL_SCOPE_WORK_PART;//取选择范围,返回一个固定的int类型的值
        int response;
        NXOpen.Tag obj;
        NXOpen.Tag view;
        double[] cursor = new double[3];
        UFUi.SelInitFnT ip = init_proc;//通过创建一个委托来执行过滤器的方法
        IntPtr userData = System.IntPtr.Zero;
        theUfSession.Ui.LockUgAccess(UFConstants.UF_UI_FROM_CUSTOM);

        try
        {
            theUfSession.Ui.SelectWithSingleDialog(message, title, scope, ip, userData, out response, out obj, cursor, out view);

        }
        finally
        {
            theUfSession.Ui.UnlockUgAccess(UFConstants.UF_UI_FROM_CUSTOM);
 
评论 6
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值