Block UI Styler > Dialog > Code Generation tab > Static APIs
Static APIs for block property
NX Block UI Styler provides Static APIs to get and set block properties.
Availability by language
The Static APIs are available for:
- NX Open for .NET:
NXOpen.BlockStylernamespace inNXOpenUI.dll - Java:
nxopen.blockstylerpackage inNXOpenUI.jar - NX Open for C++:
NXOpen::BlockStylernamespace inlibnxopenuicpp.dll - Python:
NXOpen.BlockStylermodule 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 (VB.NET)
VB.NET code for an integer block with BlockID integer0:
Private integer0 As NXOpen.BlockStyler.IntegerBlock
integer0 = CType(theDialog.TopBlock.FindBlock("integer0"), NXOpen.BlockStyler.IntegerBlock)
integer0.Value will return the Value property of this block.
To set the Value property of this block:
integer0.Value = 500
To get the Value property of this block:
intVal = integer0.Value
Use Static APIs to prevent runtime failures due to incorrect use of property names (i.e., strongly-typed block accessors are safer than generic/dynamic property lookups by string name).
Where do I find it?
| Application | Block UI Styler |
| Location in dialog box | Dialog dialog box → Code Generation tab → General list → Generate Block Specific Code |
See also
- Block UI Styler Code Generation
- Dialog dialog box — Code Generation tab (see
ui-styler/automation-code/code-generation-tab-and-callbacks.mdin this KB for the full callback list: Filter, Update, OK, Apply, Cancel, Initialize, Dialog Shown, Focus Notify, Keyboard Focus Notify, Enable OK/Apply Button)
Source: https://docs.sw.siemens.com/en-US/doc/209349590/PL20220512394070742.blockstyler/xid396515 · retrieved 2026-07-07