Ehaviv
Computer
- Jul 2, 2003
- 1,012
hI IN NX11 blockstyler help that atached in this post
I understand that for all blocksID I can use the static methods
and not getproperties and propertiesnames.
do I'm right ?
I understand that for all blocksID I can use the static methods
and not getproperties and propertiesnames.
do I'm right ?
Code:
[b]Static APIs for block property[/b]
NX Block UI Styler provides Static APIs to get and set block properties.
The Static APIs are available for:
•NX Open for .NET: NXOpen.BlockStyler namespace in NXOpenUI.dll
•Java: nxopen.blockstyler package in NXOpenUI.jar
•NX Open for C++: NXOpen::BlockStyler namespace in libnxopenuicpp.dll
•Python: NXOpen.BlockStyler module for NX Open
Use Generate Block Specific Code for block specific code generation during dialog box design time when you use the Static APIs. The default value for Generate Block Specific Code is True.
Example
[b]VB.net code for an integer block with BlockID as integer0[/b]:
Private integer0 As NXOpen.BlockStyler.IntegerBlock
integer0 = CType(theDialog.TopBlock.FindBlock("integer0"),NXOpen.BlockStyler.IntegerBlock)
[b]integer0.Value[/b] will return the Value property of this block.
To set the Value property of this block, the code should be:
[b]integer0.Value = 500[/b]
To get the Value property of this block, the code should be:
[b]Dim val as integer = integer0.Value[/b]