Macro TNP Solution

Solution description
This is solution for Topological Naming Problem described at: Topological Naming Problem

If you build object at another object, and also with Sketch it is straightforward, because you know two things:


 * Points from Sketch is always part of the face below
 * The Sketch and the face below are in the same plane

You need only store the key before any operation. For this example the object is at XY plane. So, I use Z axis value from Sketch BoundBox center (s2.Shape.BoundBox.Center[2]). Before resize operation I store the value as a key. After the resize I search all faces for the stored key.

At the end I assign the new face to the Sketch and recompute. To be honest, the most difficult part was to assign the face to Sketch.Support, for me the syntax is mind-blowing ;-)

In this example the plane is XY, but you can do exactly the same for other axes. Also you can choose other key. The same you can do for edges at Chamfer. This is already solved Woodworking project and is already available in its library.