I want to determine if a line is horizontal in a drawing view and know its start and end point positions on the drawing. The line happens to be created by a Silhouette edge. Using GetVisibleEntities2 I can get all silhouette edges in a drawing view and iterate through them. But, from what I understand the objects returned in GetVisibleEntities2 is related to the model and not the drawing. Therefore .GetCurve always returns nothing and .GetEndPoint and .GetStartPoint always cause an exception. Fair enough, but how do I get info of a line created by a silhouette edge in the drawing view? Start and end points etc. Some info to determine direction and position on the sheet. If I select the silhouette edge can I access the info from the selection some how? Could someone show some examples?
Dim MySilhouetteEdges As Object() = TryCast(View_.GetVisibleEntities2(Nothing, swViewEntityType_e.swViewEntityType_SilhouetteEdge), Object())
If MySilhouetteEdges IsNot Nothing Then
For Each SE As SilhouetteEdge In MySilhouetteEdges
Try
Dim C As Curve = SE.GetCurve 'Returns nothing
Dim SP As MathPoint = SE.GetStartPoint 'Throws exception
Dim EP As MathPoint = SE.GetEndPoint 'Throws exception
Debug.Print("")
Catch ex As Exception
Debug.Print("Error")
End Try
Next
End If