Continue to Site

Eng-Tips is the largest engineering community on the Internet

Intelligent Work Forums for Engineering Professionals

  • Congratulations pierreick on being selected by the Eng-Tips community for having the most helpful posts in the forums last week. Way to Go!

NXjournal: Eval.AskArc problem 2406

MANox

Mechanical
Apr 2, 2007
130
Hello,

many time ago I wrote journal and I used in then some function:
Code:
Dim theUfSession As UFSession = UFSession.GetUFSession()

Code:
    Function GetArcCenter(edge1 As Edge) As Double()
        Dim centerCoords As Double()
        Try
            Dim edgeTag As NXOpen.Tag = edge1.Tag
            Dim estruct As System.IntPtr
            theUfSession.Eval.Initialize2(edgeTag, estruct)
            Dim evalArc As NXOpen.UF.UFEval.Arc
            theUfSession.Eval.AskArc(estruct, evalArc)
            centerCoords = evalArc.center
            Dim diameter As Double = evalArc.radius
        Catch e As Exception
            centerCoords = Nothing
        End Try
        Return centerCoords
    End Function

And in NX2007 it works.

But now I update to NX2406 and when I delete Try Loop I have error 8 line:
NXOpen.NXException: The first parameter passed in was invalid.
w NXOpen.UF.UFEval.AskArc(IntPtr evaluator, Arc& arc)

Do You have any suggestion why this don't work?

Best regards
MANok

NX2406
Tc2412
 
Replies continue below

Recommended for you

Thank You cowski,

You right. I had round face with hexagonal inside.
All the time program selected external edge and after change NX version it start select one of internal.
And that was the problem.

Best regards

MANok
NX2406
TC2412
 

Part and Inventory Search

Sponsor