NXKnowledge

Community Knowledge > Block UI Styler

Block UI Styler: Practical Tips from Real Developers

Field-tested details about Block UI Styler that come up repeatedly in forum troubleshooting, gathered from Siemens community threads and Eng-Tips discussions.

Where to put your .dlx file

A recurring question on the forums is why a Block UI Styler dialog can't find its .dlx file at runtime. The dialog file needs to live in one of a small number of recognized locations:

  1. The directory NX was launched from.
  2. $UGII_USER_DIR/application.
  3. For released/deployed applications, using UGII_CUSTOM_DIRECTORY_FILE to point at a custom directory is the recommended approach — it avoids hardcoding paths and survives NX upgrades better than the first two options.

Combining a recorded journal with a Block UI Styler dialog

A common real-world pattern discussed on Eng-Tips ("NX 10: Combining journal and UI block styler") is: build the interactive dialog in Block UI Styler, then wire its output values into logic that was originally captured by recording a plain journal. Concretely, developers replace hardcoded coordinate literals from a recorded journal (e.g., 100, 100, 100) with the live values coming out of the dialog's fields (e.g., coOrds[0], coOrds[1], coOrds[2]). This is the standard way to go from "journal that only replays exactly what I did" to "dialog-driven tool a user can actually parameterize."

Running/testing a dialog without a full compiled app

Two lightweight ways to exercise a Block UI Styler dialog while developing, per community discussion: replay it through Tools → Journal → Play Menu, or run it as a User Exit via File → Execute → NX Open. Neither requires setting up a full deployed application, which is useful for iterating on dialog layout/behavior quickly.

Group "Expanded" property quirk

A specific, easy-to-lose-time-on quirk from an NX 10 community thread: the Expanded property on a Group block doesn't behave as expected under the default Groups (Less) display setting. If you need expand/collapse behavior to actually work, you have to switch the dialog's settings (via the settings/gear icon) to Groups (More) or enable Show Collapsed Groups — otherwise the property appears to have no effect and developers can spend time debugging code that isn't actually the problem.

Practical takeaway

  • Use UGII_CUSTOM_DIRECTORY_FILE rather than a hardcoded launch-directory path for any dialog meant to be distributed beyond your own machine.
  • Journal + Block UI Styler is a legitimate, commonly used hybrid pattern — record first, then swap literals for dialog-bound variables.
  • If a Group's expand/collapse doesn't respond, check the dialog's Groups display setting before assuming a code bug.

Source: https://community.sw.siemens.com/s/question/0D54O000061xPcDSAU/block-ui-styler-in-nx ; https://www.eng-tips.com/threads/nx-10-combining-journal-and-ui-block-styler.423907/ ; https://community.sw.siemens.com/s/question/0D54O000061xlb6SAA/nx-10-block-ui-styler-property-expanded-of-a-group · retrieved 2026-07-08