How do you work out how many segments are in a selected bezier curve and which one has been selected?
I'm doing a macro that gets the user to select a bezier, then changes the line thickness of part of that bezier.
To let me know which segments to change, I need to know two things:
- How many segments are in the bezier.Can this be done in a macro using a loop until there are no more segments reported?
- Which segment has been selected.
Are these things possible?
The reason for wanting this information is:
When we convert IGES drawings to 2d, it leaves thick lines where bolt heads rest against metal and we change them to thin. Annoyingly, there is always 1 bezier line that needs to be half thick and half thin. I can't predict how many segments these lines have (often 6) or which way round the line has generated, so I'm never sure which segments to change. If I know, for example that the user selected segment 2 of 6, I know to change line thicknesses of the first 3 segments.

