找回密码 注册 QQ登录
开思网工业级高精度在线3D打印服务

iCAx开思网

CAD/CAM/CAE/设计/模具 高清视频【积分说明】如何快速获得积分?在线3D打印服务,一键上传,自动报价 
查看: 16503|回复: 0
打印 上一主题 下一主题

[求助] 各位大侠进来看看啊。

[复制链接]
跳转到指定楼层
1
发表于 2011-10-25 14:31:58 | 只看该作者 回帖奖励 |倒序浏览 |阅读模式

马上注册,结交更多同行朋友,交流,分享,学习。

您需要 登录 才可以下载或查看,没有帐号?注册

x
各位大侠,是这样的,我想选择UG中的一些特征,用UF_UI_select_with_class_dialog这个函数,可是回调后弹出对话框说是什么“对话框区域2当前不可用”,请各位大侠帮忙啊,以下是代码




     private static Session theSession;
    private static UI theUI;
    public static Final theFinal;
    private Dialog theDialog;
    private NXOpen.UIStyler.DialogItem changeDialog;
    public static bool isDisposeCalled;
    private static UFSession theUFSession;
    static int sel_init_proc(IntPtr select_, IntPtr user_data)
    {
        int num_triples = 2;
        UFUi.Mask[] mask_triples = new UFUi.Mask[2];
        //   UFUi.Mask[] maks_triples = new UFUi.Mask[2];
        /* enable only lines and edges */
        mask_triples[0].object_type = UFConstants.UF_line_type;
        mask_triples[0].object_subtype = 0;
        mask_triples[0].solid_type = 0;
        mask_triples[1].object_type = UFConstants.UF_solid_type;
        mask_triples[1].object_subtype = 0;
        mask_triples[1].solid_type = UFConstants.UF_UI_SEL_FEATURE_ANY_EDGE;
        theUFSession.Ui.SetSelMask(select_, UFUi.SelMaskAction.SelMaskClearAndEnableSpecific, num_triples, mask_triples);
        return UFConstants.UF_UI_SEL_SUCCESS;
    }
    public void final()
    {
        theUI = UI.GetUI();
        theSession = Session.GetSession();
        theUFSession = UFSession.GetUFSession();
        string cue = "请选择所需要的体";
        string title = "请选择需要的体";
        int response;
        int count;
        Tag[] objects;
        int scope = UFConstants.UF_UI_SEL_SCOPE_WORK_PART;
        //   int scope=UF_UI_SEL_SCOPE_WORK_PART;
        theUFSession.Ui.SelectWithClassDialog(cue, title, scope, sel_init_proc, (IntPtr)0, out response, out count, out objects);
    }
分享到:  QQ好友和群QQ好友和群 QQ空间QQ空间 腾讯微博腾讯微博 腾讯朋友腾讯朋友
收藏收藏 分享淘帖 赞一下!赞一下!
您需要登录后才可以回帖 登录 | 注册

本版积分规则

3D打印手板模型快速制作服务,在线报价下单!

QQ 咨询|手机版|联系我们|iCAx开思网  

GMT+8, 2024-9-20 12:04 , Processed in 0.018680 second(s), 11 queries , Gzip On, Redis On.

Powered by Discuz! X3.3

© 2002-2024 www.iCAx.org

快速回复 返回顶部 返回列表