NX二次开发-UFUN单对象选择对话框UF_UI_select_with_single_dialog
#include <uf.h>
#include <uf_ui.h> static int select_filter_proc_fn(tag_t object, int type[], void* user_data, UF_UI_selection_p_t select)
{
if (object == NULL)
{
return UF_UI_SEL_REJECT;
}
else
{
return UF_UI_SEL_ACCEPT;
}
} static int init_proc(UF_UI_selection_p_t select, void* user_data)
{
int num_triples = ;//可选类型的数量
UF_UI_mask_t mask_triples[] =
{UF_point_type, UF_point_subtype, UF_UI_SEL_NOT_A_FEATURE,
UF_line_type, UF_line_normal_subtype, UF_UI_SEL_NOT_A_FEATURE,
UF_solid_type, UF_solid_body_subtype, UF_UI_SEL_FEATURE_BODY
};//可选对象类型
UF_UI_set_sel_mask(select, UF_UI_SEL_MASK_CLEAR_AND_ENABLE_SPECIFIC, num_triples, mask_triples);
if ((UF_UI_set_sel_procs(select, select_filter_proc_fn, NULL, user_data)) == )
{
return UF_UI_SEL_SUCCESS;
}
else
{
return UF_UI_SEL_FAILURE;
}
} UF_initialize(); //单对象选择对话框
char sCue[] = "单对象选择对话框";
char sTitle[] = "单对象选择对话框";
int iScope = UF_UI_SEL_SCOPE_NO_CHANGE;
int iResponse;
tag_t tObject;
tag_t tView;
double adCursor[];
UF_UI_select_with_single_dialog(sCue, sTitle, iScope, init_proc, NULL, &iResponse, &tObject, adCursor, &tView); UF_terminate(); Caesar卢尚宇
2019年7月1日

附加代码
常用图纸视图类型
static int init_proc(UF_UI_selection_p_t select, void* user_data)
{
int num_triples = ;//可选类型的数量
UF_UI_mask_t mask_triples[] =
{ UF_view_type, UF_UI_SEL_NOT_A_FEATURE };//图纸视图类型
UF_UI_set_sel_mask(select, UF_UI_SEL_MASK_CLEAR_AND_ENABLE_SPECIFIC, num_triples, mask_triples);
if ((UF_UI_set_sel_procs(select, select_filter_proc_fn, NULL, user_data)) == )
{
return UF_UI_SEL_SUCCESS;
}
else
{
return UF_UI_SEL_FAILURE;
}
}
NX二次开发-UFUN单对象选择对话框UF_UI_select_with_single_dialog的更多相关文章
- NX二次开发-UFUN文件选择对话框UF_UI_create_filebox
NX11+VS2013 #include <uf.h> #include <uf_ui.h> UF_initialize(); //文件选择对话框 char sPromptSt ...
- NX二次开发-UFUN参数选择对话框UF_UI_select_parameters
#include <uf.h> #include <uf_ui.h> #include <uf_modl.h> UF_initialize(); //参数选择对话框 ...
- NX二次开发-UFUN打开选择文件夹对话框UF_UI_create_filebox
#include <uf.h> #include <uf_ui.h> #include <string> using namespace std; string O ...
- NX二次开发-UFUN拾取向量对话框UF_UI_specify_vector
#include <uf.h> #include <uf_ui.h> UF_initialize(); //拾取向量对话框 ], pnt[]; int mode = UF_UI ...
- NX二次开发-UFUN单选菜单对话框uc1603
NX11+VS2013 #include <uf.h> #include <uf_ui.h> UF_initialize(); //单选菜单对话框 char sPromptSt ...
- NX二次开发-UFUN拾取平面对话框UF_UI_specify_plane
#include <uf.h> #include <uf_ui.h> UF_initialize(); //拾取平面对话框 ] = { , , , , , , , , }; ] ...
- NX二次开发-基于MFC界面对话框与NX交互的开发
打开VS2013 点击新建,选择MFC DLL 点击确定 点下一步 什么都不改,直接点完成 进来之后先编译一下,看是否编译成功 打开项目属性,更改这几处 $(UGII_BASE_DIR)\ugopen ...
- NX二次开发-Ufun API Example
UF公共类型 UF_begin_timer计时函数 https://www.cnblogs.com/nxopen2018/p/10957135.html UF_end_timer计时函数 https: ...
- NX二次开发-UFUN发射线函数UF_MODL_trace_a_ray的用法
今天是国庆节,放假休息懒得动,没有出去玩,在家研究一下发射线函数UF_MODL_trace_a_ray.小弟以前在软件公司混的时候,当时我做的那个项目就用到了UF_MODL_trace_a_ray,当 ...
随机推荐
- ansible-继续普通用户权限运行
ansible 远程以普通用户执行命令 1. ansible 10.0.0.1 -m raw -a "date" -u www 2.在ansible的主机配置文件中指定ssh_ ...
- cboard进行访问,汉化
- Python改变当前工作目录
import os print(os.getcwd()) # 打印当前工作目录 os.chdir('/Users/<username>/Desktop/') # 将当前工作目录改变为`/U ...
- 使用 @Log4j2 log.error() 打印异常日志
public static void main(String[] args) { int a = 10; try { int i = 1/0; } catch (Exception e) { Syst ...
- git ,报403错误,完美解决方案
首先命令行操作结果如下: root@zhiren-PowerEdge-T110-II:/zrun# git clone https://git.coding.net/xxxxxxxx/xxxx.git ...
- Eclipse中安装SVN插件的艰难旅程
我们写Java程序的人都知道Eclipse,也装过一些插件,比如Android开发的使用需要安装ADT等,如果代码提交的话我们可能需要安装git和svn的插件,但是这个插件我以前听过,但是一直没有安装 ...
- 使用pangolin库画出轨迹
https://github.com/stevenlovegrove/Pangolin cmake_minimum_required(VERSION 2.8) project(chapter3) ) ...
- spark的任务调度模式
spark任务调度和资源分配 1.Spark调度模式 FIFO和FAIR Spark中的调度模式主要有两种:FIFO和FAIR. 默认情况下Spark的调度模式是FIFO(先进先出),谁先提交谁先执行 ...
- phpstrom中Terminal窗口打开
Terminal窗口其实就是cmd窗口
- MProtect使用小计【三】 – 权限管理
说明 本篇简单的说一下怎么样使用的VMProtect的权限管理功能,使我们的程序拥有注册码的功能.只用的注册版的程序才能执行指定的函数. 同样这个功能VMProtect也有例子位置在:安装目录\VMP ...