Page 1 of 1

Script Hooks to Add New Toolbox Configurations to Toolbox Part

Posted: Tue Feb 06, 2024 3:11 pm
by revenki
Background:
  • We're working our way into SW Toolbox parts. One of my people has a toolbox part defined with ~100 or so permutations in its design table.
  • The preference internally is to completely populate the part file with all of the permutations as configurations, then release it once and be done with it. This is based on painful experience with Creo/Windchill family tables (if you know, you know).
  • To get the permutations into the part file as a configuration via the manual/non-script route involves using a dummy part (a plate with assorted hole sizes) in an assembly file, dragging the Toolbox part from the toolbox onto the dummy part in the assembly, and then choosing the material, size, etc. from the Toolbox part properties sidebar/panel that appears.
  • And doing this one at a time, for each permutation in the design table. Which, you might correctly imagine, is time-consuming.
What I Want to Do:
  • Because we intend to make Toolbox parts for a dozen or more specs, I'd like to write a script that will turn each design table permutation into a configuration in the Toolbox part. Unfortunately, I'm not seeing any hooks in the API for doing this.
What I've Tried:
  • Searched the forum: didn't find anything related
  • Recording macros of the manual process: SW records something, but when I run them against the list of configuration names in the design table, SW only handles those configuration names for which a configuration already exists in the part - it doesn't add the missing ones. This suggests one or more required commands are not being captured by the script recorder.
  • Searched the API documentation: limited documentation of anything related to Toolbox, in fact it looks like there really isn't a lot you can do with Toolbox via API. Found hooks to design tables, but nothing to suggest how to use them in this situation.
  • Checked the Toolbox part to see if it had a design table (via modeldoc.extension.hasdesigntable), and it tells me no, which I take to mean the table doesn't reside inside the part but in a Toolbox-related database.