×
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

is cloning supported by journals

is cloning supported by journals

is cloning supported by journals

(OP)
In recording a journal of a cloning operation none of the functions showed up. The work around so far has been to record and edit a macro of the operation.

The obvious goal is to automate a process, but I don't want to update macros every time NX is updated to a new version.

Since a quick search turned up no useful results, can anyone tell me if cloning is supported by the journal functions?

NX10.0.0.24 MP1/Windows 7 Service Pack 1

RE: is cloning supported by journals

Not that i know of, our solution was to automate the creation of clone log files according to our needs (rules which specify what should be retained and what should be cloned) which means that we can run customized cloning operations from within NX via assembly clone or out side of NX via the command line.

RE: is cloning supported by journals

(OP)
As a long time user I remember talk about log files and part creation but never tried it. Sounds like something to try, thanks for the hint.

NX10.0.0.24 MP1/Windows 7 Service Pack 1

RE: is cloning supported by journals

I don't think that cloning is supported by the journal recorder, but there are API functions for clone operations; it should be possible to use these in a custom journal. In the GTAC solution center there is a Java program that performs a clone operation, search for "clone rename displayed part only" or "nx_api4470". Perhaps it will serve to show the function calls required.

www.nxjournaling.com

RE: is cloning supported by journals

As Petulf says, I think the best method is to run a logfile in "reverse".

I. e When you run a clone operation , you will get a logfile.
Take a copy of this and you can modify the names / numbers etc as long as you follow the same syntax.
Then when you are ready , open the clone tool, -Logfiles - Load and apply existing logfile.

If you work under Teamcenter, there is a similar function there.

Regards,
Tomas

RE: is cloning supported by journals

(OP)
Hi a984928

Thanks for the links. It's good that any language can be translated through google these days. The German posting looks interesting.

NX10.0.0.24 MP1/Windows 7 Service Pack 1

RE: is cloning supported by journals

By the way the native version journal that I posted
in the previous post is adequate to your need
not to select family members because you select
the components to clone so you can select only
components that are not a family members.

RE: is cloning supported by journals

Here is a basic code snippet that will add the current displayed assembly to the clone process, apply a naming rule (in this case adding "-" to the end of every component), and define the output folder:

CODE --> vb.net

Option Strict Off
Imports System
Imports System.Windows.Forms
Imports NXOpen
Imports NXOpen.Assemblies
Imports NXOpenUI
Imports NXOpenUI.FormUtilities
Imports NXOpen.UF

Module Module1
Public Sub Main()

        Dim theSession As Session = Session.GetSession()
        Dim theUISession As UI = UI.GetUI
        Dim workPart As Part = theSession.Parts.Work
        Dim displayPart As Part = theSession.Parts.Display
        Dim theUFS As NXOpen.UF.UFSession = NXOpen.UF.UFSession.GetUFSession()
        Dim lw As ListingWindow = theSession.ListingWindow
        Dim Current_Assembly As String = displayPart.FullPath

Dim cloner As NXOpen.UF.UFClone = theUFS.Clone
        cloner.Initialise(NXOpen.UF.UFClone.OperationClass.CloneOperation)
        cloner.SetDefNaming(UFClone.NamingTechnique.NamingRule)
        cloner.SetDefDirectory("C:\users\Designer\")
        cloner.AddAssembly(Current_Assembly, Nothing)

        Dim opt As NXOpen.UF.UFClone.ExLogOpts
        opt.allow_missing_components = False

        Dim namerule1 As NXOpen.UF.UFClone.NameRuleDef
        namerule1.type = UFClone.NameRuleType.AppendString
        namerule1.new_string = "-"

        cloner.SetNameRule(namerule1, Nothing)
        cloner.SetDryrun(False)
        cloner.PerformClone(Nothing)
        cloner.Terminate()
End Sub
 Public Function GetUnloadOption(ByVal dummy As String) As Integer

        'Unloads the image when the NX session terminates
        GetUnloadOption = NXOpen.Session.LibraryUnloadOption.AtTermination

    End Function

End Module 

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