Is there a Solidworks macro to knit all surfaces and create a solid?

Hello,
By any chance, do you know a macro than can knit surface all together and create a solid, and works even when the file is composed of several multibody at the end?
I often have to used third partie softawre to design stairs and save as Autocad 3D.
When I imported it, I have to knit all stairs one by one, and that's a very heavy time consuming.
One macro than knit all stairs to itselt will be a must.
Solirdworks should knit the stairs by itself during the DXF import, but that not the case! Thanks for your help.

2 Answers

@BlackUnicornCAD, here are 3 test files. Thanks

Hey,

just completed the first full test run with your TestFullStairs file. It took about 2 minutes to iterate through all parts. So here's a quick description of what it does in particular:

- creates an internal list of all parts in the assembly
- iterate through that list
-- open the currently listed part document
-- iterate through the design tree of that part document
--- if the current feature is a surface feature, add it to the selection manager
-- by reaching the end of the design tree, create a surface sew feature if the selection is not empty (this is the case when the part contains at least one surface feature)
-- save the current part document silently
-- close the current part document

You can choose from a bunch of presets:

It's possible to toggle

- "Include Subassemblies" -> include all part documents in any present subassembly
- "Use Gap Filter" -> activates the gap filter by SolidWorks
- "Try to Form Solid Body" -> SolidWorks will try to create a solid body if enabled
- "Merge Redundant Entities" -> SolidWorks will automatically merge edges and faces by removing redundant edges and vertices

and to set a value of the datatype "double" for
- "Knit Tolerance" -> from 0.0001 to 0.1 mm
- "Maximum Gap Range" -> from 0.0001 to 0.1 mm