Reply

GetCenterPoint() API not functioning properly drawing view arcs

Hi All

 

When I'm trying to get the arc center of arcs in drawing view using GetCenterPoint() API, the coordinates returned by the API refer to either start point or end point of the arc. Please anyone walk me through this issue.

 

Thank you in advance  

3 REPLIES

Re: GetCenterPoint() API not functioning properly drawing view arcs

Hi @Admin2,

I have no problems to get all the points.

Here is my snippet:

 Function GetFirstDVArc(doc As SEDraft.DraftDocument) As SEDraft.DVArc2d
        Dim Sheet As SEDraft.Sheet
        Dim DView As SEDraft.DrawingView

        Sheet = doc.ActiveSheet
        DView = Sheet.DrawingViews.Item(1)
        Return DView.DVArcs2d.Item(1)

    End Function

    Function ArcPoints(arc As SEDraft.DVArc2d) As String
        Dim StartPos As String
        Dim EndPos As String
        Dim CenterPos As String
        Dim x, y As Double

        arc.GetStartPoint(x, y)
        StartPos = PointToString(x, y)
        arc.GetEndPoint(x, y)
        EndPos = PointToString(x, y)
        arc.GetCenterPoint(x, y)
        CenterPos = PointToString(x, y)

        Return String.Format("DVArc2d: Start = {0}, End = {1}, Center = {2}",
                             StartPos, EndPos, CenterPos)
    End Function

    Function PointToString(x As Double, y As Double) As String
        Return String.Format("({0},{1}", x, y)
    End Function
regards

JB
VS2015, SE ST10

Re: GetCenterPoint() API not functioning properly drawing view arcs

Hi JB,

 

I'm getting the center points of the arcs from the drawing view and I'm adding coordinate dimensions to the arcs with respect to their centers. But when I'm doing so, in some cases centerpoints are selected whereas sometimes end points of the arcs are being selected

 

Thank you

Solid Edge ST9

Visual Studio 2010

 

 

Re: GetCenterPoint() API not functioning properly drawing view arcs

Sorry for answering so late.
Maybe you use the wrong keypoint inputs while creating the dimension.

regards

JB
VS2015, SE ST10