I'm trying to highlight a sketched line's startpoint in green and the line's endpoint in red. I don't get an error, but it's not working either - what am I doing wrong?
Set oPartDoc = ThisApplication.ActiveDocument
Set oSketch = fActivateSketch(oPartDoc)
Set oSelect = oPartDoc.SelectSet
Set oStartHLSet = oPartDoc.CreateHighlightSet
Set oEndHLSet = oPartDoc.CreateHighlightSet
Set oRed = ThisApplication.TransientObjects.CreateColor(255, 0, 0)
Set oGreen = ThisApplication.TransientObjects.CreateColor(0, 255, 0)
Set oBlue = ThisApplication.TransientObjects.CreateColor(0, 0, 255)
For Each oEnt In oSelect
If TypeOf oEnt Is SketchLine Then
Set oLine = oEnt
' Get the start and endpoints.
'
Set oStartPoint = oLine.StartSketchPoint
Set o3DStartPoint = oSketchII.SketchToModelSpace(oStartPoint.Geometry)
' CreatePointGraphics o3DStartPoint, kEndPointStyle
Set oEndPoint = oLine.EndSketchPoint
Set o3DEndPoint = oSketchII.SketchToModelSpace(oEndPoint.Geometry)
' CreatePointGraphics o3DEndPoint, kFilledCircleSelectPointStyle
oStartHLSet.AddItem oStartPoint
oEndHLSet.AddItem oEndPoint
End If
Next oEnt
oStartHLSet.Color = oGreen
oEndHLSet.Color = oRed