关于BLOCK UI的一些控件的用法,本人曾经使用的代码,拿出来共享:

Option Strict Off

Imports NXOpen
Imports NXOpen.BlockStyler
Imports System.Runtime.InteropServices Namespace Bizca.NX.UIBlockStyler
Public Module UIBlockStylerEx <System.Runtime.CompilerServices.Extension()> _
<Obsolete>
Public Function GetPropertiesEx(ByVal block As NXOpen.BlockStyler.UIBlock) As UIBlockEx
Return New UIBlockEx(block)
End Function '#Region "ListBox"
' <System.Runtime.CompilerServices.Extension()> _
' Public Sub SetListItems(ByVal ListBox As NXOpen.BlockStyler.ListBox, ByVal stringArray() As String)
' ListBox.GetProperties.SetStrings("ListItems", stringArray)
' End Sub ' <System.Runtime.CompilerServices.Extension()> _
' Public Function GetListItems(ByVal ListBox As NXOpen.BlockStyler.ListBox) as String()
' Return ListBox.GetProperties.GetStrings("ListItems")
' End Function '#End Region End Module 'Public Class ListBoxEx
' Inherits NXOpen.BlockStyler.ListBox ' Private ower As NXOpen.BlockStyler.ListBox
' Public Sub New(ByVal block As NXOpen.BlockStyler.ListBox)
' Me.ower = block ' End Sub ' Property DDDD As String ' Public Shared Sub DSS()
' With New ListBoxEx(Nothing)
' .DDDD = "FFF"
' End With
' Dim AAAA = Function(X As NXOpen.Tag)
' Return NXOpen.Utilities.NXObjectManager.Get(X)
' End Function
' Dim WWW = AAAA(NXOpen.Tag.Null) ' End Sub 'End Class Public Class UIBlockEx
Private ower As NXOpen.BlockStyler.UIBlock Public Sub New(ByVal block As NXOpen.BlockStyler.UIBlock)
Me.ower = block
End Sub #Region "General Properties"
''' <summary>
''' 【通用】设置UIBlock的是否不禁止
''' </summary>
''' <value>[CSG] TRUE-Block 不禁止,FALSE-Block 禁止</value>
''' <returns>[CSG] TRUE-Block 不禁止,FALSE-Block 禁止</returns>
''' <remarks>[CSG] TRUE-Block 不禁止,FALSE-Block 禁止 </remarks>
Public Property Enable As Boolean
Get
Return Me.ower.GetProperties.GetLogical("Enable")
End Get
Set(ByVal value As Boolean)
Me.ower.GetProperties.SetLogical("Enable", value)
End Set
End Property ''' <summary>
''' 【通用】设置UIBlock的是否展开(Block必须拥有自己的组)
''' </summary>
''' <value>[SG] TRUE- 展开,FALSE- 折叠</value>
''' <returns>[SG] TRUE- 展开,FALSE- 折叠</returns>
''' <remarks>Block必须拥有自己的组(设计时才可以指定)</remarks>
Public Property Expanded As Boolean
Get
Return Me.ower.GetProperties.GetLogical("Expanded")
End Get
Set(ByVal value As Boolean)
Me.ower.GetProperties.SetLogical("Expanded", value)
End Set
End Property ''' <summary>
''' 【通用】标签
''' </summary>
''' <value></value>
''' <returns></returns>
''' <remarks>[CSG] Any String Value </remarks>
Public Property Label As String
Get
Return Me.ower.GetProperties.GetString("Label")
End Get
Set(ByVal value As String)
Me.ower.GetProperties.SetString("Label", value)
End Set
End Property ''' <summary>
''' 【通用】设置UIBlock的Show可见属性
''' </summary>
''' <value>[CSG] TRUE-Block 可见,FALSE-Block 不可见</value>
''' <returns>[CSG] TRUE-Block 可见,FALSE-Block 不可见</returns>
''' <remarks>Sets the visibility of the block</remarks>
Public Property Show As Boolean
Get
Return Me.ower.GetProperties.GetLogical("Show")
End Get
Set(ByVal value As Boolean)
Me.ower.GetProperties.SetLogical("Show", value)
End Set
End Property
#End Region #Region "Selection"
''' <summary>
''' 【选择对象】自动推进
''' </summary>
''' <value></value>
''' <returns></returns>
''' <remarks>自动推进到下一个UIBlock</remarks>
Public Property AutomaticProgression As Boolean
Get
Return Me.ower.GetProperties.GetLogical("AutomaticProgression")
End Get
Set(ByVal value As Boolean)
Me.ower.GetProperties.SetLogical("AutomaticProgression", value)
End Set
End Property ''' <summary>
''' 【选择对象】提示字符串
''' </summary>
''' <value></value>
''' <returns></returns>
''' <remarks>状态栏提示字符串</remarks>
Public Property Cue As String
Get
Return Me.ower.GetProperties.GetString("Cue")
End Get
Set(ByVal value As String)
Me.ower.GetProperties.SetString("Cue", value)
End Set
End Property ''' <summary>
''' 【选择对象】标签字符串
''' </summary>
''' <value></value>
''' <returns></returns>
''' <remarks></remarks>
Public Property LabelString As String
Get
Return Me.ower.GetProperties.GetString("LabelString")
End Get
Set(ByVal value As String)
Me.ower.GetProperties.SetString("LabelString", value)
End Set
End Property ''' <summary>
''' 【选择对象】点覆盖
''' </summary>
''' <value></value>
''' <returns></returns>
''' <remarks>是否启用捕捉点</remarks>
Public Property PointOverlay As Boolean
Get
Return Me.ower.GetProperties.GetLogical("PointOverlay")
End Get
Set(ByVal value As Boolean)
Me.ower.GetProperties.setLogical("PointOverlay",value)
End Set
End Property ''' <summary>
''' 【选择对象】设置选择过滤器
''' </summary>
''' <param name="maskAction"></param>
''' <param name="maskTriples"></param>
''' <remarks></remarks>
Public Sub SetSelectionFilter(ByVal maskAction As NXOpen.Selection.SelectionAction, ByVal maskTriples() As NXOpen.Selection.MaskTriple)
Me.ower.GetProperties.SetSelectionFilter("SelectionFilter", maskAction, maskTriples)
End Sub ''' <summary>
''' 【选择对象】选择的对象
''' </summary>
''' <value></value>
''' <returns></returns>
''' <remarks></remarks>
Public Property SelectedObjects As NXOpen.TaggedObject()
Get
Return Me.ower.GetProperties.GetTaggedObjectVector("SelectedObjects")
End Get
Set(ByVal value As NXOpen.TaggedObject())
If value IsNot Nothing Then
Me.ower.GetProperties.SetTaggedObjectVector("SelectedObjects", value)
End If
End Set
End Property ''' <summary>
''' 【选择对象】最后取消选择的对象
''' </summary>
''' <value></value>
''' <returns></returns>
''' <remarks></remarks>
Public ReadOnly Property LastDeselectedObjects As NXOpen.TaggedObject()
Get
Return Me.ower.GetProperties.GetTaggedObjectVector("LastDeselectedObjects")
End Get
End Property ''' <summary>
''' 【选择对象】最后选择的对象
''' </summary>
''' <value></value>
''' <returns></returns>
''' <remarks></remarks>
Public ReadOnly Property LastSelectedObjects As NXOpen.TaggedObject()
Get
Return Me.ower.GetProperties.GetTaggedObjectVector("LastSelectedObjects")
End Get
End Property ''' <summary>
''' 【选择对象】步骤的状态
''' </summary>
''' <value>只有当初始化的时候才可以设置该属性</value>
''' <returns></returns>
''' <remarks>CIG Required[必须] Optional[可选] Satisfied[满意]</remarks>
Public Property StepStatus As StepStatusEnum
Get
Return Me.ower.GetProperties.GetEnum("StepStatus")
End Get
Set(ByVal value As StepStatusEnum)
Me.ower.GetProperties.SetEnum("StepStatus", value)
End Set
End Property ''' <summary>
''' 步骤的状态
''' </summary>
''' <remarks></remarks>
Public Enum StepStatusEnum
''' <summary>
''' 必要的
''' </summary>
''' <remarks></remarks>
[Required] = 0
''' <summary>
''' 可选的
''' </summary>
''' <remarks></remarks>
[Optional] = 1
''' <summary>
''' 满意的
''' </summary>
''' <remarks></remarks>
[Satisfied] = 2
End Enum ''' <summary>
''' 【选择对象】拾取点
''' </summary>
''' <value></value>
''' <returns></returns>
''' <remarks>选择对象时在屏幕上触击的点</remarks>
Public ReadOnly Property PickPoint As NXOpen.Point3d
Get
Return Me.ower.GetProperties.GetPoint("PickPoint")
End Get
End Property ''' <summary>
''' 【指定光标位置】显示临时点
''' </summary>
''' <value></value>
''' <returns></returns>
''' <remarks>Specify Cursor Location</remarks>
Public Property DisplayTemporaryPoint As Boolean
Get
Return Me.ower.GetProperties.GetLogical("DisplayTemporaryPoint")
End Get
Set(ByVal value As Boolean)
Me.ower.GetProperties.SetLogical("DisplayTemporaryPoint", value)
End Set
End Property ''' <summary>
''' 【指定光标位置】光标位置
''' </summary>
''' <value></value>
''' <returns></returns>
''' <remarks>Specify Cursor Location</remarks>
Public Property CursorLocation As NXOpen.Point3d
Get
Return Me.ower.GetProperties.GetPoint("CursorLocation")
End Get
Set(ByVal value As NXOpen.Point3d)
Me.ower.GetProperties.SetPoint("CursorLocation", value)
End Set
End Property ''' <summary>
''' 【Specify Point】【Specify Vector】点
''' </summary>
''' <value></value>
''' <returns></returns>
''' <remarks></remarks>
Public Property Point As NXOpen.Point3d
Get
Return Me.ower.GetProperties.GetPoint("Point")
End Get
Set(ByVal value As NXOpen.Point3d)
Me.ower.GetProperties.SetPoint("Point", value)
End Set
End Property ''' <summary>
''' 【Specify Vector】矢量
''' </summary>
''' <value></value>
''' <returns></returns>
''' <remarks></remarks>
Public Property Vector As Vector3d
Get
Return Me.ower.GetProperties.GetVector("Vector")
End Get
Set(ByVal value As Vector3d)
Me.ower.GetProperties.SetVector("Vector", value)
End Set
End Property #End Region Public Property LogicalValue As Boolean
Get
Return Me.ower.GetProperties.GetLogical("Value")
End Get
Set(ByVal value As Boolean)
Me.ower.GetProperties.SetLogical("Value", value)
End Set
End Property #Region "Enum Block"
''' <summary>
''' 【Enumeration】枚举值
''' </summary>
''' <value></value>
''' <returns></returns>
''' <remarks></remarks>
Public Property EnumValue As Integer
Get
Return Me.ower.GetProperties.GetEnum("Value")
End Get
Set(ByVal value As Integer)
Me.ower.GetProperties.SetEnum("Value", value)
End Set
End Property ''' <summary>
''' 【Enumeration】枚举字符串
''' </summary>
''' <value></value>
''' <returns></returns>
''' <remarks></remarks>
Public Property EnumAsString As String
Get
Return Me.ower.GetProperties.GetEnumAsString("Value")
End Get
Set(ByVal value As String)
Me.ower.GetProperties.SetEnumAsString("Value", value)
End Set
End Property ''' <summary>
''' 【Enumeration】枚举字符串数组成员
''' </summary>
''' <value></value>
''' <returns></returns>
''' <remarks></remarks>
Public Property EnumMembers As String()
Get
Return Me.ower.GetProperties.GetEnumMembers("Value")
End Get
Set(ByVal value As String())
Me.ower.GetProperties.SetEnumMembers("Value", value)
End Set
End Property #End Region #Region "Expression"
''' <summary>
''' 【表达式】【线性尺寸】【角度尺寸】【半径尺寸】【轨迹上的尺寸(沿曲线的位置)】表达式
''' </summary>
''' <value></value>
''' <returns></returns>
''' <remarks></remarks>
Public Property Formula As String
Get
Return Me.ower.GetProperties.GetString("Formula")
End Get
Set(ByVal value As String)
Me.ower.GetProperties.SetString("Formula", value)
End Set
End Property ''' <summary>
''' 【线性尺寸】【半径尺寸】手柄方向
''' </summary>
''' <value></value>
''' <returns></returns>
''' <remarks></remarks>
Public Property HandleOrientation As NXOpen.Vector3d
Get
Return Me.ower.GetProperties.GetVector("HandleOrientation")
End Get
Set(ByVal value As NXOpen.Vector3d)
Me.ower.GetProperties.SetVector("HandleOrientation", value)
End Set
End Property ''' <summary>
''' 【角度尺寸】手柄X轴方向
''' </summary>
''' <value></value>
''' <returns></returns>
''' <remarks></remarks>
Public Property HandleXAxis As NXOpen.Vector3d
Get
Return Me.ower.GetProperties.GetVector("HandleXAxis")
End Get
Set(ByVal value As NXOpen.Vector3d)
Me.ower.GetProperties.SetVector("HandleXAxis", value)
End Set
End Property ''' <summary>
''' 【角度尺寸】手柄Z轴方向
''' </summary>
''' <value></value>
''' <returns></returns>
''' <remarks></remarks>
Public Property HandleZAxis As NXOpen.Vector3d
Get
Return Me.ower.GetProperties.GetVector("HandleZAxis")
End Get
Set(ByVal value As NXOpen.Vector3d)
Me.ower.GetProperties.SetVector("HandleZAxis", value)
End Set
End Property ''' <summary>
''' 【线性尺寸】【角度尺寸】【半径尺寸】手柄原点
''' </summary>
''' <value></value>
''' <returns></returns>
''' <remarks></remarks>
Public Property HandleOrigin As NXOpen.Point3d
Get
Return Me.ower.GetProperties.GetPoint("HandleOrigin")
End Get
Set(ByVal value As NXOpen.Point3d)
Me.ower.GetProperties.SetPoint("HandleOrigin", value)
End Set
End Property ''' <summary>
''' 【线性尺寸】【角度尺寸】【半径尺寸】【轨迹上的尺寸(沿曲线的位置)】显示焦点手柄
''' </summary>
''' <value></value>
''' <returns></returns>
''' <remarks></remarks>
Public Property ShowFocusHandle As Boolean
Get
Return Me.ower.GetProperties.GetLogical("ShowFocusHandle")
End Get
Set(ByVal value As Boolean)
Me.ower.GetProperties.SetLogical("ShowFocusHandle", value)
End Set
End Property ''' <summary>
''' 【线性尺寸】【角度尺寸】【半径尺寸】显示手柄
''' </summary>
''' <value></value>
''' <returns></returns>
''' <remarks></remarks>
Public Property ShowHandle As Boolean
Get
Return Me.ower.GetProperties.GetLogical("ShowHandle")
End Get
Set(ByVal value As Boolean)
Me.ower.GetProperties.SetLogical("ShowHandle", value)
End Set
End Property #End Region
''' <summary>
''' 【String】字符串值
''' </summary>
''' <value></value>
''' <returns></returns>
''' <remarks></remarks>
Public Property StringValue As String
Get
Return Me.ower.GetProperties.GetString("Value")
End Get
Set(ByVal value As String)
Me.ower.GetProperties.SetString("Value", value)
End Set
End Property Public Property StringArrayValue As String()
Get
Return Me.ower.GetProperties.GetStrings("Value")
End Get
Set(ByVal value As String())
Me.ower.GetProperties.SetStrings("Value", value)
End Set
End Property Public Property IntegerValue As Integer
Get
Return Me.ower.GetProperties.GetInteger("Value")
End Get
Set(ByVal value As Integer)
Me.ower.GetProperties.SetInteger("Value", value)
End Set
End Property Public Property DoubleValue As Double
Get
Return Me.ower.GetProperties.GetDouble("Value")
End Get
Set(ByVal value As Double)
Me.ower.GetProperties.SetDouble("Value", value)
End Set
End Property #Region "Selection with Browse" ''' <summary>
''' 指定选择文件或文件夹的路径
''' </summary>
''' <value></value>
''' <returns></returns>
''' <remarks>任何代表有效的文件路径或文件夹路径的字符串。</remarks>
Public Property Path As String
Get
Return Me.ower.GetProperties.GetString("Path")
End Get
Set(ByVal value As String)
Me.ower.GetProperties.SetString("Path", value)
End Set
End Property ''' <summary>
''' 指定筛选器的格式为"*.txt,*.xml"。如果未设置此属性,嵌以.prt作为默认的过滤器。
''' </summary>
''' <value></value>
''' <returns></returns>
''' <remarks>字符串值的格式为"*.txt,*.xml"。如果空白,则以.prt作为默认的过滤器。</remarks>
Public Property Filter As String
Get
Return Me.ower.GetProperties.GetString("Filter")
End Get
Set(ByVal value As String)
Me.ower.GetProperties.SetString("Filter", value)
End Set
End Property #End Region End Class
End Namespace

NXOpen.BlockStyler的一些用法的更多相关文章

  1. 【NX二次开发】Block UI NXOpen::BlockStyler::BlockDialog

    定义: NXOpen::BlockStyler::BlockDialog* theDialog; theDialog->PerformApply();//执行应用并重新启动对话框. theDia ...

  2. NX二次开发-用户自定义资源栏选项卡RegisterActivationCallback

    最近在研究UGOPEN文件夹里的例子,发现从NX10版开始可以用户自定义资源栏选项卡了,NX10以下也可以做,但是需要反编译DLL调内部函数,这个只有高手才会,我是不会弄. 以前看过有人把标准件库做到 ...

  3. NX二次开发-BlockUI的Tree树控件

    关于BlockUI的Tree树控件只要研究UGOPEN里西门子官方的那个例子在结合去查NXOPEN的帮助基本就可以了.[不过我是看唐工的视频学会的,没办法自己领悟性不太强] //=========== ...

  4. NX二次开发-Block UI C++界面Enumeration(枚举)控件的获取(持续补充)

    NX9+VS2012 public: void SetBlockUIShow(); void EnumInt::SetBlockUIShow() { //获取枚举控件 PropertyList* En ...

  5. NX二次开发-Block UI C++界面Toggle(开关)控件的获取(持续补充)

    NX9+VS2012 public: void SetBlockUIShow(); void ToggleInt::SetBlockUIShow() { //获取开关控件 //获取枚举控件 Prope ...

  6. 【NX二次开发】Block UI 切换开关

    属性说明 常规         类型 描述     BlockID     String 控件ID     Enable     Logical 是否可操作     Group     Logical ...

  7. 【NX二次开发】Block UI 选择对象

    属性说明 属性   类型   描述   常规           BlockID    String    控件ID    Enable    Logical    是否可操作    Group    ...

  8. 【NX二次开发】Block UI 属性类型

     Block UI 属性类型的读写总结: 帮助文件 NXOpen::BlockStyler::UIBlock::GetProperties() String类型 //设置值 this->块ID- ...

  9. 【NX二次开发】不健全的双击按钮。

    为什么说不健全,是因为 双击按钮时会先运行单击事件,这个后面再解决.但是模仿某公司的图层操作工具是没有问题了,因为这个工具运行双击事件时本来就需要运行单击事件,不仔细看容易被唬住. 图层操作工具(双击 ...

随机推荐

  1. MySQL-基础-2

    MySQL数据库介绍 • MySQL是一种开放源代码的关系型数据库管理系统(RDBMS),MySQL数据库系统使用最常用的数据库管理语言--结构化查询语言(SQL)进行数据库管理. • MySQL的历 ...

  2. JavaScript——数组——slice方法

    JavaScript--数组--slice方法 JavaScript中的slice方法类似于字符串的substring方法,作用是对数组进行截取. slice方法有两个参数,indexStart 和 ...

  3. (一)Superset 1.3图表篇——Table

    本系列文章基于Superset 1.3.0版本.1.3.0版本目前支持分布,趋势,地理等等类型共59张图表.本次1.3版本的更新图表有了一些新的变化,而之前也一直没有做过非常细致的图表教程. 而且目前 ...

  4. 虚拟数字存储表——SQLServer2012可高用

    窗口函数之虚拟数字辅助表 数字辅助表是一个整数序列,可以用它来完成多种不同的查询任务.数字表有很多任务,如生成日期和时间值序列,及分裂值列表.通常,建议在数据库中保存这样一个永久表,并填充尽可能多的数 ...

  5. Django——ORM打印SQL

    如果想打印ORM转换过程中的SQL,需要在settings.py中进行如下配置: LOGGING = { 'version': 1, 'disable_existing_loggers': False ...

  6. 2021秋 noip 模拟赛

    9.9 T3 第负二题 \(f_i\) 的数学意义:中心在第 \(i\) 行的全 \(1\) 组成的最大正方形(对角线水平/竖直),对角线长 \(2f_i-1\). 显然 \(f_i\) 具有单调性( ...

  7. 通过JDK动态代理实现 Spring AOP

    1.新建一个目标类 接口:public interface IUserService //切面编程 public void addUser(); public void updateUser( ); ...

  8. weblogic从ssrf到redis获取shell

    一.环境搭建和知识储备 1.1.影响版本 漏洞编号:CVE-2014-4210 weblogic 10.0.2.0 weblogic 10.3.6.0 1.2.Docker搭建环境 1.进入vulhu ...

  9. 制作nginx+php的docker镜像方法

    制作nginx+php的docker镜像方法一.准备安装的工具工具:docker-17.06.0-ce.nginx-1.13.2.PHP-5.5.38 .supervisor配置思路:1.安装dock ...

  10. undefined和null

    undefined和null undefined的情景: 声明变量为赋值 var name; console.og(name); //undefined 访问对象上不存在的属性 var obj={} ...