×
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 + CamGeomType.CamDrive

NXOpen. AskBoundaries + CamGeomType.CamDrive

NXOpen. AskBoundaries + CamGeomType.CamDrive

(OP)
I'm trying to work with NXOpen.UF.UFCambnd.AskBoundaries(....) function.
I'm particularly interested in the FIXED_CONTOUR kind of operation with BOUNDARY drive method.
When I run, as a journal, this test code on such an operation it works perfectly well, meaning that it finishes successfully and doesn't through an error:

------------------------------
Option Strict Off
Imports System
Imports System.IO
Imports System.Windows.Forms
Imports NXOpen
Imports NXOpen.CAM
Imports NXOpen.UF
Imports NXOpen.Utilities

Module test
    
    Dim theSession As Session
    Dim theUfSession As UFSession
    
    
    Sub Main()
        
        theSession = Session.GetSession()
        theUfSession = UFSession.GetUFSession()
        Dim WorkPart As Part = TheSession.Parts.Work
        
        Dim setupTag As Tag
        Dim camObjectTag As Tag
        Dim selectedTags() As NXOpen.Tag
        Dim selectedCount As Integer
        
        Dim lw as ListingWindow = theSession.ListingWindow
        lw.Open()
        
        theUfSession.Cam.InitSession()
        theUfSession.Setup.AskSetup(setupTag)
        
        theUfSession.UiOnt.AskSelectedNodes(selectedCount, selectedTags)
        
        Dim i As Integer
        Dim x() as IntPtr
        theUFSession.Cambnd.AskBoundaries(selectedTags(0), CamGeomType.CamTrim, i, x)
        lw.WriteLine(i)
        
    End Sub
End Module
-----------------------------

However, if I change CamGeomType.CamTrim to CamGeomType.CamDrive, it does throw an error, "Object is not the desired type".
I also tried to delete those boundaries with
 theUFSession.Cambnd.DeleteBoundaries(selectedTags(0), CamGeomType.CamDrive)
and it didn't work either.
So, my question is, how do I get access to drive boundaries?

 

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