「UG/NX」BlockUI 选择小平面区域 Select Facet Region

在这里插入图片描述

✨博客主页
何曾参静谧的博客
📌文章专栏
「UG/NX」BlockUI集合
📚全部专栏
「UG/NX」NX二次开发「UG/NX」BlockUI集合
「VS」Visual Studio「QT」QT5程序设计
「C/C++」C/C++程序设计「Win」Windows程序设计
「DSA」数据结构与算法「File」数据文件格式

控件说明

超级点控件在实际开发中使用的频率很不太高,个人在开发时一般喜欢用选择对象控件进行代替。

中文英文公有类内部类
超级点Super PointBlockStyler::SuperPointUGS::Ul::Comp::SuperPoint

界面效果

在这里插入图片描述

公有属性

在这里插入图片描述

PS:(仅创建)的代码在 initialize_cb() 或 dialogShown_cb() 中添加

常规

对话框标题 DialogLabel(仅创建)
theDialog->TopBlock()->FindBlock("Dialog")->GetProperties()->SetString("Label","标签/位图demo");//设置对话框标题
控件灰显 Enable
BlockID->GetProperties()->SetLogical("Enable",true);//控件可选
BlockID->GetProperties()->SetLogical("Enable",false);//控件不可选
分组 Group(仅创建)
BlockID->GetProperties()->SetLogical("Group",true);//显示控件分组
BlockID->GetProperties()->SetLogical("Group",false);//取消控件分组
控件标题 Label
BlockID->GetProperties()->SetString("Label",str);//设置控件标题
控件显隐 Show
BlockID->GetProperties()->SetLogical("Show",true);//设置控件显示隐藏
BlockID->GetProperties()->SetLogical("Show",false);//设置控件隐藏

其他

国籍文本 AllowInternationalTextInput(仅创建)
BlockID->GetProperties()->SetLogical("AllowInternationalTextInput",true);//设置为国籍文本
显示密文 IsPassword(仅创建)
BlockID->GetProperties()->SetLogical("IsPassword",true);//设置输入内容显示为密文***
BlockID->GetProperties()->SetLogical("IsPassword",false);//设置输入内容显示为明文ABC
本地化 Localize(仅创建)
BlockID->GetProperties()->SetLogical("Localize",true);//本地化
保存值 RetainValue
BlockID->GetProperties()->SetLogical("RetainValue",true);//保存值 对话框记忆

属性界面

在这里插入图片描述

代码实现

PS:(仅创建)的代码在initialize_cb()或dialogShown_cb()中添加

命名空间

using namespace std;
using namespace NXOpen;

对齐

是否显示捕捉点 PointOverlay
BlockID->GetProperties()->SetLogical("PointOverlay",True);// 可选捕捉点
智能更新选项 SmartUpdateOption
BlockID->GetProperties()->SetLogical("SmartUpdateOption",0);// 智能更新选项随模型
捕捉点类型可见性 SnapPointTypesEnabled
BlockID->GetProperties()->SetBits("SnapPointTypesEnabled",0x11ff8);// 捕捉点类型可见性
捕捉点内容被启用 SnapPointTypesOnByDefault
BlockID->GetProperties()->SetBits("SnapPointTypesOnByDefault",0x298);// 捕捉点内容被启用

特定于块

自动跳转到控件 AutomaticProgression
BlockID->GetProperties()->SetLogical("AutomaticProgression",False);// 自动跳转到控件
气泡提示图片 BallonTooltipImage
NXString bitmapPath=BlockID->GetProperties()->GetString("BallonTooltipImage");// 获取气泡提示图片
BlockID->GetProperties()->SetString("BallonTooltipImage",bitmapPath);// 设置气泡提示图片
气泡提示布局 BallonTooltipLayout
int intLayout=BlockID->GetProperties()->GetEnum("BallonTooltipLayout");// 获取气泡提示布局
BlockID->GetProperties()->SetEnum("BallonTooltipLayout",intLayout);// 设置气泡提示布局
气泡提示文本 BallonTooltipText
NXString strBitmap=BlockID->GetProperties()->GetString("BallonTooltipText");// 获取气泡提示文本
BlockID->GetProperties()->SetString("BallonTooltipText",strBitmap);// 设置气泡提示文本
图片 Bitmap
NXString bmpPath=BlockID->GetProperties()->GetString("Bitmap");// 获取位图路径
BlockID->GetProperties()->SetString("Bitmap",bmpPath);// 设置位图路径
显示虚拟交线 BlendVirtualCurveOverlay
BlockID->GetProperties()->SetLogical("BlendVirtualCurveOverlay",False);// 显示虚拟交线
笔刷工具大小 BrushToolSize
BlockID->GetProperties()->SetDouble("BrushToolSize",10);// 笔刷工具大小
提示 Cue
BlockID->GetProperties()->SetString("Cue","选择小平面体区域");// 提示
小平面收集规则 FacetCollectionRules
BlockID->GetProperties()->SetBits("FacetCollectionRules",0x3ff);// 小平面收集规则
标签标题 LabelString
BlockID->GetProperties()->SetString("LabelString","选择小平面区域");// 标签标题
拥有小平面收集器 OwningFacetCollector
tag_t obj_tag;
BlockID->GetProperties()->SetTag("OwningFacetCollector",obj_tag);// 拥有小平面收集器
选定面集合规则 SelectedFacetCollectionRule
BlockID->GetProperties()->SetInteger("SelectedFacetCollectionRule",0);// 选定面集合规则
必选/可选/已选 StepStatus(仅创建)
BlockID->GetProperties()->SetEnum("StepStatus",1);// 0:必选/1:可选/2:已选
支持的小平面类型 SupportedFacetTypes
BlockID->GetProperties()->SetEnum("SupportedFacetTypes",0);// 支持的小平面类型
提示条标题 ToolTip
BlockID->GetProperties()->SetString("ToolTip","小平面区域");// 提示条标题

开发中的应用

  • 1
    点赞
  • 1
    收藏
    觉得还不错? 一键收藏
  • 打赏
    打赏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包

打赏作者

何曾参静谧

你的鼓励将是我创作的最大动力

¥1 ¥2 ¥4 ¥6 ¥10 ¥20
扫码支付:¥1
获取中
扫码支付

您的余额不足,请更换扫码支付或充值

打赏作者

实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

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

余额充值