cancel
Showing results for 
Search instead for 
Did you mean: 

holeDrillingBuilder1.CycleTable.AxialStepover.DistanceBuilder.Value

Pioneer
Pioneer

I have recorded a journal to create drilling operation using hole_making template; part of the step is to change the default "Drill" cycle to "Drill, Deep" cycle, following which edit the Maximum Distance to 3.0 mm within then Cycle Parameters. This is part of the journal:

 

' ----------------------------------------------

' Dialog Begin Drilling - [DRILLING]

' ----------------------------------------------

holeDrillingBuilder1.CycleTable.CycleType = "Drill,Deep"

Dim markId3 As NXOpen.Session.UndoMarkId

markId3 = theSession.SetUndoMark(NXOpen.Session.MarkVisibility.Invisible, "Start")

Dim holeMachiningCutParameters2 As NXOpen.CAM.HoleMachiningCutParameters

holeMachiningCutParameters2 = holeDrillingBuilder1.CuttingParameters

theSession.SetUndoMarkName(markId3, "Cycle Parameters Dialog")

' ----------------------------------------------

' Dialog Begin Cycle Parameters

' ----------------------------------------------

Dim markId4 As NXOpen.Session.UndoMarkId

markId4 = theSession.SetUndoMark(NXOpen.Session.MarkVisibility.Invisible, "Cycle Parameters")

holeDrillingBuilder1.CycleTable.AxialStepover.DistanceBuilder.Value = 3.0

 

But when I replay the journal, even though the operation was created and the "Drill" cycle was successfully changed to "Drill, Deep" cycle, the maximum distance was not change, remain 0 mm.

Any clue?

 

LIM

NX10.0.1.4

WINDOWS 7

 

 

NX 10.0.3.5, WINDOWS 7
4 REPLIES

Re: holeDrillingBuilder1.CycleTable.AxialStepover.DistanceBuilder.Value

Esteemed Contributor
Esteemed Contributor

1) Did you edit the journal *at all*?

 

2) You need to include more of the journal (i.e. the part where you "commit" the changes).

Ken Akerboom Sr CAx Systems Engr, Moog, Inc.
Production: NX10.0.3.5 MP5 + patch/TC11.2
I'd rather be e-steemed than e-diseaseled


Re: holeDrillingBuilder1.CycleTable.AxialStepover.DistanceBuilder.Value

Pioneer
Pioneer

here is the code:

' NX 10.0.1.4
' Journal created by sclim on Wed Jun 08 12:02:11 2016 Malay Peninsula Standard Time
'
Option Strict Off
Imports System
Imports NXOpen

Module NXJournal
    Sub Main(ByVal args() As String)

        Dim theSession As NXOpen.Session = NXOpen.Session.GetSession()
        Dim workPart As NXOpen.Part = theSession.Parts.Work

        Dim displayPart As NXOpen.Part = theSession.Parts.Display

        ' ----------------------------------------------
        '   Menu: Insert->Operation...
        ' ----------------------------------------------
        Dim markId1 As NXOpen.Session.UndoMarkId
        markId1 = theSession.SetUndoMark(NXOpen.Session.MarkVisibility.Visible, "Create Operation")

        Dim nCGroup1 As NXOpen.CAM.NCGroup = CType(workPart.CAMSetup.CAMGroupCollection.FindObject("DUMMY"), NXOpen.CAM.NCGroup)

        Dim method1 As NXOpen.CAM.Method = CType(workPart.CAMSetup.CAMGroupCollection.FindObject("DRILL_METHOD"), NXOpen.CAM.Method)

        Dim tool1 As NXOpen.CAM.Tool = CType(workPart.CAMSetup.CAMGroupCollection.FindObject("DRL-09.5"), NXOpen.CAM.Tool)

        Dim featureGeometry1 As NXOpen.CAM.FeatureGeometry = CType(workPart.CAMSetup.CAMGroupCollection.FindObject("HOLE_BOSS_GEOM"), NXOpen.CAM.FeatureGeometry)

        Dim operation1 As NXOpen.CAM.Operation
        operation1 = workPart.CAMSetup.CAMOperationCollection.Create(nCGroup1, method1, tool1, featureGeometry1, "hole_making", "DRILLING", NXOpen.CAM.OperationCollection.UseDefaultName.True, "DRILLING")

        Dim markId2 As NXOpen.Session.UndoMarkId
        markId2 = theSession.SetUndoMark(NXOpen.Session.MarkVisibility.Invisible, "Start")

        Dim holeDrilling1 As NXOpen.CAM.HoleDrilling = CType(operation1, NXOpen.CAM.HoleDrilling)

        Dim holeDrillingBuilder1 As NXOpen.CAM.HoleDrillingBuilder
        holeDrillingBuilder1 = workPart.CAMSetup.CAMOperationCollection.CreateHoleDrillingBuilder(holeDrilling1)

        Dim holeMachiningCutParameters1 As NXOpen.CAM.HoleMachiningCutParameters
        holeMachiningCutParameters1 = holeDrillingBuilder1.CuttingParameters

        theSession.SetUndoMarkName(markId2, "Drilling - [DRILLING] Dialog")

        ' ----------------------------------------------
        '   Dialog Begin Drilling - [DRILLING]
        ' ----------------------------------------------
        holeDrillingBuilder1.CycleTable.CycleType = "Drill,Deep"

        Dim markId3 As NXOpen.Session.UndoMarkId
        markId3 = theSession.SetUndoMark(NXOpen.Session.MarkVisibility.Invisible, "Start")

        Dim holeMachiningCutParameters2 As NXOpen.CAM.HoleMachiningCutParameters
        holeMachiningCutParameters2 = holeDrillingBuilder1.CuttingParameters

        theSession.SetUndoMarkName(markId3, "Cycle Parameters Dialog")

        ' ----------------------------------------------
        '   Dialog Begin Cycle Parameters
        ' ----------------------------------------------
        Dim markId4 As NXOpen.Session.UndoMarkId
        markId4 = theSession.SetUndoMark(NXOpen.Session.MarkVisibility.Invisible, "Cycle Parameters")

        holeDrillingBuilder1.CycleTable.AxialStepover.DistanceBuilder.Value = 3.0

        theSession.DeleteUndoMark(markId4, Nothing)

        Dim markId5 As NXOpen.Session.UndoMarkId
        markId5 = theSession.SetUndoMark(NXOpen.Session.MarkVisibility.Invisible, "Cycle Parameters")

        theSession.DeleteUndoMark(markId5, Nothing)

        theSession.SetUndoMarkName(markId3, "Cycle Parameters")

        theSession.DeleteUndoMark(markId3, Nothing)

        Dim markId6 As NXOpen.Session.UndoMarkId
        markId6 = theSession.SetUndoMark(NXOpen.Session.MarkVisibility.Invisible, "Drilling - [DRILLING]")

        theSession.DeleteUndoMark(markId6, Nothing)

        Dim markId7 As NXOpen.Session.UndoMarkId
        markId7 = theSession.SetUndoMark(NXOpen.Session.MarkVisibility.Invisible, "Drilling - [DRILLING]")

        Dim nXObject1 As NXOpen.NXObject
        nXObject1 = holeDrillingBuilder1.Commit()

        theSession.DeleteUndoMark(markId7, Nothing)

        theSession.SetUndoMarkName(markId2, "Drilling - [DRILLING]")

        holeDrillingBuilder1.Destroy()

        theSession.DeleteUndoMark(markId2, Nothing)

        Dim markId8 As NXOpen.Session.UndoMarkId
        markId8 = theSession.SetUndoMark(NXOpen.Session.MarkVisibility.Invisible, "Start")

        Dim holeDrilling2 As NXOpen.CAM.HoleDrilling = CType(nXObject1, NXOpen.CAM.HoleDrilling)

        Dim holeDrillingBuilder2 As NXOpen.CAM.HoleDrillingBuilder
        holeDrillingBuilder2 = workPart.CAMSetup.CAMOperationCollection.CreateHoleDrillingBuilder(holeDrilling2)

        Dim holeMachiningCutParameters3 As NXOpen.CAM.HoleMachiningCutParameters
        holeMachiningCutParameters3 = holeDrillingBuilder2.CuttingParameters

        theSession.SetUndoMarkName(markId8, "Drilling - [DRILLING] Dialog")

        ' ----------------------------------------------
        '   Dialog Begin Drilling - [DRILLING]
        ' ----------------------------------------------
        Dim markId9 As NXOpen.Session.UndoMarkId
        markId9 = theSession.SetUndoMark(NXOpen.Session.MarkVisibility.Invisible, "Drilling - [DRILLING]")

        theSession.DeleteUndoMark(markId9, Nothing)

        Dim markId10 As NXOpen.Session.UndoMarkId
        markId10 = theSession.SetUndoMark(NXOpen.Session.MarkVisibility.Invisible, "Drilling - [DRILLING]")

        Dim nXObject2 As NXOpen.NXObject
        nXObject2 = holeDrillingBuilder2.Commit()

        theSession.DeleteUndoMark(markId10, Nothing)

        theSession.SetUndoMarkName(markId8, "Drilling - [DRILLING]")

        holeDrillingBuilder2.Destroy()

        theSession.DeleteUndoMark(markId8, Nothing)

        ' ----------------------------------------------
        '   Menu: Tools->Journal->Stop Recording
        ' ----------------------------------------------

    End Sub
End Module

 

 Capture.JPG

NX 10.0.3.5, WINDOWS 7

Re: holeDrillingBuilder1.CycleTable.AxialStepover.DistanceBuilder.Value

I duplicated recording and playing back your journal in NX 11 and it worked fine, so the good news is that the issue has already been fixed. 

 

I compared the differences and identified what is missing.Add the following line to set the type to constant before the value is set, and your journal plays fine for me in NX 10.0.3:

	holeDrillingBuilder1.CycleTable.AxialStepover.StepoverType = NXOpen.CAM.StepoverBuilder.StepoverTypes.Constant
        holeDrillingBuilder1.CycleTable.AxialStepover.DistanceBuilder.Value = 3.0000

 

Mark Rief
Retired Siemens

Re: holeDrillingBuilder1.CycleTable.AxialStepover.DistanceBuilder.Value

Pioneer
Pioneer
Hi Mark

Thanks


LIM
NX 10.0.3.5, WINDOWS 7