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,当 ...
随机推荐
- Vue中的作用域插槽
<!DOCTYPE html> <html> <head> <meta charset="UTF-8"> <title> ...
- vue组件绑定原生事件
<!DOCTYPE html> <html> <head> <meta charset="UTF-8"> <title> ...
- windows更改文件打开方式
- leetcood学习笔记-35-二分法
题目: 第一次提交; class Solution: def searchInsert(self, nums: List[int], target: int) -> int: for i in ...
- bzoj 2561
传送门:http://www.lydsy.com/JudgeOnline/problem.php?id=2561 考虑做mst的时候,什么时候这条边不在这棵mst上呢? 就是比他小的权值的边讲这条边的 ...
- RMQ区间求最值
RMQ用于区间快速查找最值,适用于期间数值无更改的情况.其预处理的复杂度为O(nlogn),查询的时间复杂度为O(1),对比于线段树的预处理O(nlogn),查询O(logn)来说,在某些情况下有着其 ...
- NX二次开发-NXOpen::Drawings::DrawingSheet Class Reference
NX11+VS2013 #include <NXOpen/Section.hxx> #include <NXOpen/SectionCollection.hxx> #inclu ...
- NAT和路由器 基本概念
NAT(Network Address Translation, 网络地址转换)是1994年提出的.当在专用网内部的一些主机本来已经分配到了本地IP地址(即 仅在本专用网内使用的专用地址),但现在又想 ...
- 穿过代理服务器取远程用户真实IP地址
public static string GetIP() { string str = ""; //穿过代理服务器取远程用户真实IP地址: if (System.Web.HttpC ...
- Win7下使用DbgPrint
在Win7下默认DbgPrint输出信息后,使用DbgView看不到内容. 新建一个reg文件,双击导出就行了. Windows Registry Editor Version 5.00 [HKEY_ ...