×
INTELLIGENT WORK FORUMS
FOR ENGINEERING PROFESSIONALS

Log In

Come Join Us!

Are you an
Engineering professional?
Join Eng-Tips Forums!
  • Talk With Other Members
  • Be Notified Of Responses
    To Your Posts
  • Keyword Search
  • One-Click Access To Your
    Favorite Forums
  • Automated Signatures
    On Your Posts
  • Best Of All, It's Free!
  • Students Click Here

*Eng-Tips's functionality depends on members receiving e-mail. By joining you are opting in to receive e-mail.

Posting Guidelines

Promoting, selling, recruiting, coursework and thesis posting is forbidden.

Students Click Here

Jobs

NXOpen AskBoundaries error with CamDrive

NXOpen AskBoundaries error with CamDrive

NXOpen AskBoundaries error with CamDrive

(OP)
I am attempting to find the number of drive boundaries within a fixed-contour Cam operation and am having the same issue as found in this post.


Any help would be greatly appreciated.
This is the code that I am using:

CODE

Option Strict Off
Imports System
Imports NXOpen
Imports NXOpen.UF

Module ask_boundary_count

    Dim theSession As Session = Session.GetSession()
    Dim WorkPart As Part = theSession.Parts.Work
    Dim DisplayPart As Part = theSession.Parts.Display
    Dim ufs As UFSession = UFSession.GetUFSession()
    Dim lw As ListingWindow = theSession.ListingWindow

    Sub Main()
        If WorkPart IsNot Nothing Then
            Dim setupTag As Tag
            ufs.Cam.InitSession()
            ufs.Setup.AskSetup(setupTag)
            Try
                Dim selectedTags() As NXOpen.Tag
                Dim selectedCount As Integer
                lw.Open()
                lw.WriteLine(vbLf & "Searching for selected nodes...")
                ufs.UiOnt.AskSelectedNodes(selectedCount, selectedTags)
                If selectedCount <= 0 Then
                    lw.WriteLine("No CAM node selected...exit")
                    Return
                End If
                lw.WriteLine(" Found " & selectedCount & " selected nodes...")
                Dim inx As Integer = 0
                Dim setBnd() As IntPtr
                ufs.Cambnd.AskBoundaries(selectedTags(0), CamGeomType.CamDrive, inx, setBnd)
                lw.WriteLine("count " & inx)
            Catch ex As NXOpen.NXException
                lw.Open()
                lw.WriteLine("Error: ")
                lw.WriteLine(ex.Message)
            End Try
        End If
    End Sub

End Module 


thread561-265526: NXOpen. AskBoundaries + CamGeomType.CamDrive

Red Flag This Post

Please let us know here why this post is inappropriate. Reasons such as off-topic, duplicates, flames, illegal, vulgar, or students posting their homework.

Red Flag Submitted

Thank you for helping keep Eng-Tips Forums free from inappropriate posts.
The Eng-Tips staff will check this out and take appropriate action.

Reply To This Thread

Posting in the Eng-Tips forums is a member-only feature.

Click Here to join Eng-Tips and talk with other members!


Resources