Cancel
Showing results for 
Search instead for 
Did you mean: 

how to change cut direction for all mirrored toolpaths at a time

Hi All,

I would like to know is there any way to change cut direction from climb to conventional for mirrored tool path at a time by using journal or something else. and also i want to add one column for cut direction in model tree . could you please let me know the process to add column also

 

Regards,

Gani

 

Regards,
Ganesh
NX 8.5 and Vericut 7.3
17 REPLIES

Re: how to change cut direction for all mirrored toolpaths at a time

Attached is a journal that will edit all the selected operations, or select a group.

Rename it to .vb, comment or uncomment the commands around line 109 to suit.

 

We provide several boiler plates for these types of tasks. Generally you can record a journal, and then paste those commands in to one of the samples to generalize it. Please see the tech tip http://community.plm.automation.siemens.com/t5/Tech-Tips-Knowledge-Base-NX/Learn-to-use-Journal-File...  .

 

You cannot add a user defined column to the Operation Navigator.

Mark Rief
Retired Siemens

Re: how to change cut direction for all mirrored toolpaths at a time

Hi Mark,

Thanks For your reply. It's Working greate with Planar mill But I would like to adapt all types of operation in this code so First I tried with contour Profile which I am using more frequently. but Its giving an error. Also I want to know where I can find operation subtype number and operation builder name details. My NX not installed with help. if you have any reference guide that would help me alot

 

Regards,

Gani

NX 8.5

Regards,
Ganesh
NX 8.5 and Vericut 7.3

Re: how to change cut direction for all mirrored toolpaths at a time

PLM World Member Phenom PLM World Member Phenom
PLM World Member Phenom

"My NX not installed with help"  ???????

 

Why not?

 

Your company pays lots of money for the software but neglects to install he help files, I would find that unacceptable It's not like that would cost you anything extra, you have already paid for this.

John Joyce, Manufacturing Engineer,
Senior Aerospace Connecticut
www.senioraeroct.com
Production: NX11.0.2.7, Vericut 8.0.3
Development: Tcl/Tk

Re: how to change cut direction for all mirrored toolpaths at a time

Hi John,

 

I don't know the reason but let me check with my IT team. When I press F1, it's pop up the error message as "Unable to display help information, cannot find the HTML file"

 

Hope my IT team will give information about help files installation

 

Regards,

Gani

Regards,
Ganesh
NX 8.5 and Vericut 7.3

Re: how to change cut direction for all mirrored toolpaths at a time

Esteemed Contributor
Esteemed Contributor

What version of NX?

 

If NX10, do you need a full domain name for the server (e.g. "automation.siemens.com", or IP address, e.g. "10.1.2.3")?  Neither of these work now, supposedly fix is in NX10.0.2

 

If you can just use the server, without periods, it may be able to work.

 

Ken

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: how to change cut direction for all mirrored toolpaths at a time

Hi Ken,

We are using NX8.5.2.3. Could you tell me the details how to fix

 

Regards,

Gani

Regards,
Ganesh
NX 8.5 and Vericut 7.3

Re: how to change cut direction for all mirrored toolpaths at a time

Esteemed Contributor
Esteemed Contributor

NX9 & earlier are set up differently

 

Look in %UGII_BASE_DIR%\ugii_env_ug.dat for the env variables for UGII_UGDOC_***

 

Read thru the documentation in that area.

 

Also look on UGanswer for ways to point these to a web server based documentation if appropriate.

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: how to change cut direction for all mirrored toolpaths at a time

Hi Ken,

 

Thanks For your reply

I searcged in ugii_env_ug.dat file for UGDOC but no luck. In my base directory UG DOC folder not at all available. Might be something happened while installation long ago.

 

Regards,

Gani

Regards,
Ganesh
NX 8.5 and Vericut 7.3

Re: how to change cut direction for all mirrored toolpaths at a time

Hi Mark,

I added surface contour operation to the code and there wan no errors in code but when I Run the code it's nothing chnaged for contour area or contour profile(multi axis) operations.

 

Here is the code

'=============================================================================
'
'   Copyright 2015 Siemens Product Lifecycle Management Software Inc. All Rights Reserved.
'
'=============================================================================
'  REVISIONS

'     05-mar-2015  Mark Rief  adapt for cut direction 
'
' ===========================================================================
'   DESCRIPTION

'     This program will edit planar type mill operations
'
'     This can be used as a boiler plate to set other method parameters.
' ============================================================================
 
Option Strict Off
Imports System
Imports System.IO
Imports System.Windows.Forms
Imports NXOpen
Imports NXOpen.CAM
Imports NXOpen.UF
Imports NXOpen.Utilities

Module flutelength

    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

        theUfSession.Cam.InitSession()
        theUfSession.Setup.AskSetup(setupTag)

        ' If there is a setup only then we go further
        If setupTag <> 0 Then

            ' Get the selected nodes from the Operation Navigator
            theUfSession.UiOnt.AskSelectedNodes(selectedCount, selectedTags)

            Dim ptr As IntPtr = New System.IntPtr
            Dim cycle_cb_fn As UFNcgroup.CycleCbFT = New UFNcgroup.CycleCbFT(AddressOf cycle_cb)

            Dim i As Integer
            'Loop over the selected nodes to take action
            For i = 0 To selectedCount - 1
                ' The selected item needs to be checked to take action
                action(selectedTags(i))
                ' Now if the selected item is a Group object then we need to cycle objects inside it
                theUfSession.Ncgroup.CycleMembers(selectedTags(i), cycle_cb_fn, ptr)
            Next i
        End If

    End Sub


    Function cycle_cb(ByVal camObjectTag As Tag, ByVal ptr As IntPtr) As Boolean

        Dim answer As Boolean
        ' Every item needs to be checked to take action
        answer = action(camObjectTag)
        Return answer

    End Function

    Function action(ByVal camObjectTag As Tag) As Boolean

        Dim camObject As NXObject = NXObjectManager.Get(camObjectTag)
        Dim WorkPart As Part = TheSession.Parts.Work
		
        'Check if the object is an Operation
        If TypeOf camObject Is CAM.Operation Then
            Dim operationType As Integer
            Dim operationSubtype As Integer

            'Get the type and subtype of the operation
            theUFSession.Obj.AskTypeAndSubtype(camObjectTag, operationType, operationSubtype)
				theSession.ListingWindow.Open()
				theSession.ListingWindow.WriteLine("operationSubtype = " & operationSubtype)

            Dim operationBuilder As CAM.MillOperationBuilder

            If operationSubtype = 110 Then             ' This is a Planar Milling Operation so create a Planar Milling Builder
                operationBuilder = WorkPart.CamSetup.CAMOperationCollection.CreatePlanarMillingBuilder(camObject)
            ElseIf operationSubtype = 260 Then         ' This is a Cavity Milling Operation so create a Cavity Milling Builder
                operationBuilder = WorkPart.CamSetup.CAMOperationCollection.CreateCavityMillingBuilder(camObject)
            ElseIf operationSubtype = 261 Then         ' This is a Face Milling Operation so create a Face Milling Builder
                operationBuilder = WorkPart.CamSetup.CAMOperationCollection.CreateFaceMillingBuilder(camObject)
            ElseIf operationSubtype = 263 Then         ' This is a Z Level Milling Operation so create a Z Level Milling Builder
                operationBuilder = WorkPart.CamSetup.CAMOperationCollection.CreateZLevelMillingBuilder(camObject)
		 ElseIf operationSubtype = 210 Then         ' This is a Surafce Contour Operation so create a Surafce Contour Builder
                operationBuilder = WorkPart.CamSetup.CAMOperationCollection.CreateSurfaceContourBuilder(camObject)
		
		 

            End If

            ' Check if there is a valid Builder
            If operationBuilder IsNot Nothing Then
			
				' Set cut direction
				'operationBuilder.CutParameters.CutDirection.Type = CAM.CutDirection.Types.Climb
				operationBuilder.CutParameters.CutDirection.Type = CAM.CutDirection.Types.Conventional
				'operationBuilder.CutParameters.CutDirection.Type = CAM.CutDirection.Types.Mixed
			
                'Commit the change to the operation( this is the equivalent of OK'ing the operation dialog )
                operationBuilder.Commit()

                'Destroy the builder its job is done(clean up memory)
                operationBuilder.Destroy()

				' Comment the following two lines to suppress the listing window
				theSession.ListingWindow.Open()
				theSession.ListingWindow.WriteLine("Parameters set in: " & camObject.Name() )
				
            End If

        End If

        Return True
    End Function

End Module






















 

Regards,
Ganesh
NX 8.5 and Vericut 7.3

Learn online





Solution Information