Script icon

Flatten Selected Parts | XFdtd

Remove all features from each part's modeling sequence.

Screenshot of project tree selection.

The Flatten Selected Parts macro removes all features from the modeling sequence of multiple selected parts, providing functionality equivalent to right-clicking on each part's modeling sequence and choosing the Flatten option. Flattening parts decreases project load times and frees computer memory, impacting projects that contain a large number of parts and modeling operations.

Use the macro by following these steps:

  1. Download Flatten Selected Parts.xmacro
  2. Place the file in your Macros Menu directory, or right-click on Scripts in the Project Tree and choose Import Scripts.
  3. Select the desired parts and assemblies in the Project Tree.
  4. Execute the script by either selecting it in the Macros Menu, or clicking the Execute Macro button in the Scripting Window.

When executed, the script cycles through the selected parts and assemblies, flattening each modeling sequence. Upon completion, a window indicates the number of flattened parts.