Continue to Site

Eng-Tips is the largest engineering community on the Internet

Intelligent Work Forums for Engineering Professionals

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

NXOpen. AskBoundaries + CamGeomType.CamDrive

Status
Not open for further replies.

Andy25

Mechanical
Oct 4, 2006
4
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?

 
Status
Not open for further replies.

Part and Inventory Search

Sponsor