I've been trying to find a way to get the bend Note attached to a specific bend line using API (VBA) but I just can't figure it out.
Does anyone have an idea ?
The goal of the macro is to display two lines (on both sides of the bend line), that correspond to the minimum length needed to fold the part. Basically, any cut in between those 2 lines will be deformed, and if the edge of the part is between those lines, we can't fold the part: (the two blue lines define the deformation area)
So far, I got the macro working but I am considering that all folds are 90deg. However, the "Minimum needed length" depends on the angle (among others), and I would like to be able to pickup the bend angle for each bend from the bend line, to get a more accurate display...
In terms of code, I use "GetBendLines" to fill an array with all the bend lines and then I use a "For" loop to select each bend line individually. I then offset them to get the blue lines:
(Min is the offset value and it is a property of the part at the moment but I want to replace it with a formula, function of the angle)
If Min = 0 Then
If FlatView.GetBendLineCount <> 0 Then
BendLineArr = FlatView.GetBendLines
For i = 0 To UBound(BendLineArr)
Set swSkSeg = BendLineArr(i)
***--> Ideally, I would get the bend note info associated to the bend line i here <--- ***
boolstatus = swSkSeg.Select4(True, swSelData)
boolstatus = swModel.SketchOffsetEntities2(Min / 1000, True, False)
Thank you in advance!