I'm creating a macro that will create a pattern that is driven by two bounding features. The part would have an extrusion feature with its direction Up To Vertex.
1) Select a control path. This path is the upper bound of the feature direction axis.
2) Select number of instances that you want total.
3) Select the feature that you want to replicate. Upon selecting the feature, the macro will retrieve the line segment for the direction and the line segment for the normal on the surface. These will be used for creating the library feature and for inserting the library feature. Also, the lower bounding feature (terminating feature) is found from the selected feature to replicate.
After clicking the check mark, the macro generates the direction and normal line segments for use for the library feature placement (which I have deactivated for now). For each direction line segment, the macro places one of the endpoints correctly on the upper curve. However, for the other endpoint the macro will
1. not place the endpoint on the terminating feature if the terminating feature is a face of a feature or a surface
Run macro on parts "term surface.SLDPRT" and "term partface.SLDPRT". Run with pattern instances = 7
2. place the endpoint on the terminating feature if the terminating feature is an edge or sketch but the sketch is over defined because there is a conflict between the perpendicular constraint of the direction line and the coincident constraint of the endpoint on the terminating feature.
Run macro on parts "term edge.SLDPRT" and "term sketch.SLDPRT". Run with pattern instances = 7
To get an idea of what the end result should look like, run "term plane.SLDPRT"
You can run the macro called "main". This will bring up the userform so you can make selections.