We have a macro function that we use as part of our automatic breakdown to extract all profile from a machine assembly and save them as DXF's so we can send it to the laser cutters.
The function is a slightly modified version of the advice Keith Rice gave me here https://forum.solidworks.com/message/364402#364402 to select the largest face on an extruded part therefore determining the surface we want for the profile DXF.
This system works really well but every so often we get caught out by a part that typically is a profile that has a machining process performed once laser cut. This means the "largest surface" doesn’t necessarily contain all the information needed to get in the raw pre-machined profile. An example image is attached of a laser cut sprocket where the teeth are cut off because they are chamfered which creates a break in the surface.
My ideal solution, which may not be possible, it to run a check on the selected largest face to make sure all touching faces are perpendicular itself. I can then raise an exception and get eh user to check the DXF is correct. Is this possible or is there another solution that would be better suited?
SolidworksApi macros