Community Knowledge > Routing
NX Routing Part Library and Stock Setup: Common Pitfalls
Practitioners on the Eng-Tips "Siemens: UG/NX" forum have repeatedly flagged NX Mechanical Routing's part/stock library setup as one of the harder administrative tasks in NX — one long-time poster summed it up bluntly: routing is "NX's red headed step child that keeps getting ignored," reflecting ongoing frustration that library tooling and stock management have received less polish than mainstream modeling/assembly features. (Source: Routing mechanical, using family members as stock)
Two competing approaches to stock, and their tradeoffs
NX offers two ways to represent "stock" (raw pipe/tube/conduit segments before qualified parts are placed on them):
- Part families as stock — parameterized family members driven by a spreadsheet-style part family table.
- Routing part library (.ptb-based) stock — stock definitions stored in
.ptb(part table binary/attribute) files organized into searchable library folders.
Key pitfall: .ptb files are independent of part families. If your part family table gets a new stock size/variant added, that change does not propagate automatically into the .ptb file — an administrator must manually update the .ptb with the new stock attributes, or newly-added family stock sizes simply won't show up correctly through the routing library UI. Users called this out as a source of drift between the "source of truth" part family and what routing actually offers designers. (Source: Routing mechanical, using family members as stock)
Why bother with the library approach anyway: the payoff is attribute-based search. With stock organized into the routing part library, a designer can right-click and search library folders by attributes — size, material, schedule, etc. — the same way they would search a part family table, without needing to already know the exact part number. This is a real productivity win for large stock catalogs, but it comes at the cost of the dual-maintenance problem above. (Source: Routing Parts Library - Siemens: UG/NX)
Getting custom stock into the library (the "ss2ptb" workflow)
Multiple threads describe essentially the same multi-step process for adding a new custom stock type to mechanical routing, and multiple forum participants independently confirmed it is tedious to get right the first time:
- Create a parameterized model of the stock cross-section/geometry.
- Edit the necessary data in NX Part Families (attributes, expressions, size table).
- Export/save the part family data as an Excel file, then re-save it as a
.txtfile in the expected format. - Save the associated part with a
.prtextension in the correct library location. - Run the
ss2ptb.execonversion utility to generate the actual.ptbfile NX routing reads at runtime.
One poster summarized the overall experience plainly: "the library was quite a pain to get set up." (Source: Adding custom stock to the mechanical routing)
Practical takeaways for anyone standing up a routing library
- Decide at a corporate/CAD-admin policy level, not per-project, whether stock will be legacy swept-feature stock or converted to component-based stock via "Convert to stock as components" — mixing approaches across a library causes downstream confusion for designers switching between projects. (Source: NX Routing Mechanical Notes – Part 1)
- If you maintain stock as part families, put a process in place (checklist or script) to re-run the
.ptbexport whenever the family table changes — otherwise the library and the family silently diverge. - Budget real setup time up front. This is consistently described as one of the more painful one-time investments in adopting NX Routing, not a quick checkbox.
- Consider whether the maintenance burden of attribute-searchable library folders is worth it for your catalog size; for a small, stable stock catalog, plain part families may be simpler to keep in sync even though search-by-attribute is lost.
Source: https://www.eng-tips.com/threads/routing-mechanical-using-family-members-as-stock.370209/ · retrieved 2026-07-10