Install
Pure NX Open for Python: nothing to compile, no licence beyond NX Join and Check-Mate. Verified on NX 2606.5001.
As a Check-Mate test
- Unzip. Put the
diacheckfolder somewhere NX can read, for exampleD:\nx_custom\diacheck. It holds anapplicationfolder withNXCheckers.jsonand four Python files. - Point NX at it: set
UGII_USER_DIR=D:\nx_custom\diacheckbefore NX starts, or add that folder to thecustom_dirs.datyour site already uses. - Start NX and open the assembly. In Analysis › Check-Mate › Set Up Tests the test is under Join › Point Join › Fastener Hardware Diameter.
- Customize it if your hardware lives in an XML database (below), then run it. Failing fasteners are listed against their FAS object; the full table goes to the listing window.
Without Check-Mate
With the assembly open, File › Execute › NX Open (Alt+F8) and choose run_diacheck.py. Same code, same table, plus a JSON report beside the part.
run_journal.exe run_diacheck.py -args D:\path\asm.prt D:\path\report.json run_journal.exe ExecuteChecker.py -args D:\path\asm.prt D:\logs (through Check-Mate, batch)
Telling it where your hardware library is
NX Join stores only the names of a fastener’s hardware. The checker reads the diameters from the same library the Join dialog reads: the Hardware.xlsx in the folder of each hardware part (found automatically), and Join XML databases, which you list in Hardware XML Databases. The diameter column is Diameter<Double:Length:in> (or mm); the type column is Type or Hardware Type.
Parameters
| Parameter | Default | Meaning |
|---|---|---|
| Equality Tolerance (in) | 0.0001 | Diameters closer than this are equal. |
| Washer Must Have a Diameter | false | true: a washer with no diameter cannot pass (the description text). |
| Type Aliases | (empty) | Map other hardware types onto the five, e.g. Collar=NUT; Lock Washer=WASHER. |
| Hardware XML Databases | (empty) | Join hardware.xml files to read, separated by ; |
| Extra Hardware Library Folders | (empty) | Folders searched for Hardware.xlsx besides the one next to each part. |
| Join Subtypes to Check | Fastener | Join subtype labels, separated by ; |
| JSON Report File | (empty) | Write the full per-fastener report here. |
| Log Option | LOG_ERROR | Level a failing fastener is logged at. Could-not-check is always a warning. |