You can take coordinates of bend line(start and end points) and after that make calculations. Sorry cant control your code, because dont like VBA - I am using C# for coding with SW API.
Thanks for the reply. I kind of figured what you're saying was possible. The only problem is I don't know how to do it in code. I can do some more digging or hope that someone knows how to do what you are talking about through VBA.
Some code I using before:
Feature FlangeFeat = swModel.FirstFeature();
if (FlangeFeat.GetTypeName() == "SMBaseFlange" || FlangeFeat.GetTypeName() == "EdgeFlange")
if (OneBend.GetTypeName() == "SketchBend" || OneBend.GetTypeName() == "OneBend")
FlangeFeat = FlangeFeat.GetNextFeature();
OneBendFeatureData swOneBend = (OneBendFeatureData)BF.GetDefinition();
SketchSegment SS = swOneBend.FlatPatternSketchSegment;
Sketch SkInSpace = SS.GetSketch();
MathTransform swMT = SkInSpace.ModelToSketchTransform;
swMT = swMT.Inverse();
SketchLine SL = (SketchLine)SS;
double SP = SL.GetStartPoint();
double EP = SL.GetEndPoint();
swMU = swApp.GetMathUtility();
MathPoint MPS = swMU.CreatePoint(SP);
MPS = MPS.MultiplyTransform(swMT);
MathPoint MPE = swMU.CreatePoint(EP);
MPE = MPE.MultiplyTransform(swMT);
double dis1 = Math.Sqrt(Math.Pow((MPS.ArrayData - BMatrix[i, 0]), 2) + Math.Pow((MPS.ArrayData - BMatrix[i, 1]), 2) + Math.Pow((MPS.ArrayData - BMatrix[i, 2]), 2));
This is written in C# correct?
Yes in C#, but for SW it is not so big question. We also using common language that provide us API. When I am writing I use examples in VBA however cant write in it.
This code would work great to find the lengths of each bend, but how would I tie each sketch segment back to its bend feature? I need to be able to update each bend based on the bend line length.