Continue to Site

Eng-Tips is the largest engineering community on the Internet

Intelligent Work Forums for Engineering Professionals

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

Error after running journal..

Status
Not open for further replies.

DesEngineer4

Mechanical
Feb 19, 2013
181
Hi all,

Can any one help me on the following issue..

I am using the below journal in moving the features and lines and arcs and components...etc to respective layers. This journal is working very fine in respective of moving those objects to specified layers...But, after completing the action of journal the hidden datum's and csys`s are coming out...I have attached the snap shots of the model, how it looks after running the journal....

Please help me..
Thanks in Advance..


Code:
Option Strict Off  
Imports System  
Imports System.Collections  
Imports NXOpen  
Imports NXOpen.UF  
Imports NXOpen.Utilities  
Imports NXOpen.Assemblies  
Imports NXOpen.Features

Module layermove  

    Sub Main()  

        Dim s As Session = Session.GetSession()  
        Dim lw As ListingWindow = s.ListingWindow  
        Dim ufs As UFSession = UFSession.GetUFSession()  
        Dim workPart As Part = s.Parts.Work  
          
        Dim displaypart As Part = s.Parts.Display  

        Dim pointcol As PointCollection = workPart.Points  
        Dim linecol As LineCollection = workPart.Lines  
        Dim arccol As ArcCollection = workPart.Arcs  
        Dim splinecol As SplineCollection = workPart.Splines  
        Dim sketchcol As SketchCollection = workpart.Sketches  
	   Dim bodycol As BodyCollection = workpart.Bodies  
        Dim allComp1 As ArrayList = New ArrayList  
	  
	Dim objArray(0) As DisplayableObject  

	Dim pointslayer As Integer = 90  
        Dim linelayer As Integer = 90  
        Dim arclayer As Integer = 90  
        Dim coniclayer As Integer = 90  
        Dim splinelayer As Integer = 90  
        Dim csyslayer As Integer = 40  
        Dim daxislayer As Integer = 40  
        Dim dplanelayer As Integer = 40  
        Dim bodylayer As Integer = 1  
        Dim sketchlayer As Integer = 40  

        If pointcol.ToArray().Length > 0 Then  
            For Each pt As Point In pointcol  
                If (pt.Layer >79 or pt.Layer <60)  
                ufs.Obj.SetLayer(pt.Tag, pointslayer)  
              End If  
            Next  
        End If  

        If linecol.ToArray().Length > 0 Then  
            For Each ln As Line In linecol  
                If ((ln.Layer >79 or ln.Layer <60) and (ln.Layer >256 or ln.Layer <241) and ln.Layer >1)  
                ufs.Obj.SetLayer(ln.Tag, linelayer)  
	      End If  
            Next  
        End If  

        If arccol.ToArray().Length > 0 Then  
            For Each arc1 As Arc In arccol  
                If (arc1.Layer >79 or arc1.Layer <60)  
                ufs.Obj.SetLayer(arc1.Tag, arclayer)  
              End If  
            Next  
        End If  

        If splinecol.ToArray().Length > 0 Then  
            For Each sp As Spline In splinecol  
                If (sp.Layer >79 or sp.Layer <60)  
                ufs.Obj.SetLayer(sp.Tag, splinelayer)  
               End If  
            Next  
        End If  

         If bodycol.ToArray().Length > 0 Then  
            For Each sb As Body In bodycol  
		If sb.Layer >19 Then  
                ufs.Obj.SetLayer(sb.Tag,bodylayer)  
		End If  
	    Next  
	End If  

          
          For Each obj As DisplayableObject In workPart.Datums  
            If TypeOf obj Is DatumPlane Then  
                objArray(0) = obj  
                workPart.Layers.MoveDisplayableObjects(dplanelayer, objArray)  
            End If  

            If TypeOf obj Is DatumAxis Then  
                objArray(0) = obj  
                workPart.Layers.MoveDisplayableObjects(daxislayer, objArray)  
            End If  
        Next  
	  
	 If sketchcol.ToArray().Length > 0 Then  
            For Each sk As Sketch In sketchcol  
                If (sk.Layer >39 or sk.Layer <40)  
                ufs.Obj.SetLayer(sk.Tag, sketchlayer)  
             End If  
            Next  
        End If  
	  
        Dim coniccol(-1) As Tag  
        Dim conictype As Integer = 6  
        Dim conictag As Tag = Tag.Null  
        Dim count As Integer = 0  

        ufs.Obj.CycleObjsInPart(workPart.Tag, conictype, conictag)  
        While conictag <> Tag.Null  
            ReDim Preserve coniccol(count)  
            coniccol(count) = conictag  
            count += 1  
            ufs.Obj.CycleObjsInPart(workPart.Tag, conictype, conictag)  
        End While  


        If coniccol.Length > 0 Then  
            For i As Integer = 0 To coniccol.Length - 1  
                ufs.Obj.SetLayer(coniccol(i), coniclayer)  
            Next  
        End If  
   
        Dim csyscol(-1) As Tag  
        Dim csystype As Integer = 45  

        Dim csystag As NXOpen.Tag = Tag.Null  
        count = 0  

        ufs.Obj.CycleObjsInPart(workPart.Tag, csystype, csystag)  
        While csystag <> Tag.Null  
            ReDim Preserve csyscol(count)  
            csyscol(count) = csystag  
            count += 1  
            ufs.Obj.CycleObjsInPart(workPart.Tag, csystype, csystag)  
        End While  
        If csyscol.Length > 0 Then  
            For i As Integer = 0 To csyscol.Length - 1  
                ufs.Obj.SetLayer(csyscol(i), csyslayer)  
            Next  
        End If  
     
	'move symbolic thread arcs to layer 1
	For each myFeature as Feature in workPart.Features  
	    if myFeature.FeatureType = "SYMBOLIC_THREAD" then  
	        for each myEnt as arc in myFeature.GetEntities  
		    myEnt.Layer = 1  
		    myEnt.RedisplayObject  
		next  
	    end if  
	Next  

        Dim root As Component = s.Parts.Display.ComponentAssembly.RootComponent  
		If Not IsNothing(root) Then  
			getAllComponents2(root, allComp1)  
			Dim dispobj As DisplayableObject = Nothing  
			Dim cnt1 As Integer = allComp1.Count  
			Dim objectArray1(cnt1 - 1) As DisplayableObject  
			Dim objlayer As Integer = Nothing  
			Dim cnt2 As Integer = 0  
			For i As Integer = 0 To cnt1 - 1  
				dispobj = DirectCast(allComp1(i), DisplayableObject)  
				objlayer = dispobj.Layer  
				If objlayer > 19 Then  
					ReDim Preserve objectArray1(cnt2)  
					objectArray1(cnt2) = allComp1(i)  
					cnt2 += 1  
				End If  
			Next  
			If cnt2 > 0 Then  
				displaypart.Layers.MoveDisplayableObjects(1, objectArray1)  
			End If  
		End If  
      
    End Sub  

    Sub getAllComponents2(ByVal comp As Component, ByRef allComp As ArrayList)  
        Dim child As Component = Nothing  
        Dim space As String = Nothing  
        For Each child In comp.GetChildren()  
            allComp.Add(child)  
            getAllComponents2(child, allComp)  
        Next  
        End Sub  


    Public Function GetUnloadOption(ByVal dummy As String) As Integer  

 'Unloads the image immediately after execution within NX
        GetUnloadOption = NXOpen.Session.LibraryUnloadOption.Immediately  

    End Function  

End Module

Thanks & Regards,
Sam
 
Replies continue below

Recommended for you

Here's what I think is happening:
The datum csys objects start on a layer that you have made invisible, the journal moves them to your specified layer which is visible.

I'd suggest updating your journal to make the datum layer(s) invisible.

www.nxjournaling.com
 
Yes Cowski,

This is major problem Which i am facing...Can you give me the solution...
I am thinking that..it is the problem with collection type which we have coded in journal..Am I right...?

This journal is collecting all the virtual datum planes and datum csys. But, it is enough to change the layers of datum`s which are visible in part navigator in NX. How can I do this..


Please advice....

Thanks & Regards,
Sam
 
shanmuk44 said:
I am thinking that..it is the problem with collection type which we have coded in journal..Am I right...?

Well... no, not really.
I think the easiest solution here is to make your datum layers invisible.

Open a part, turn on a few layers then record a journal and turn off one or more layers. Incorporate that code into your journal to turn off the datum layers after you move objects.

www.nxjournaling.com
 
Yeah..
It would be better...
Nice suggestion (Thank you Cowski)


Thanks & Regards,
Sam
 
Hi cowski..

I tried what you said in our previous conversation. Suppose I am moving all the datums and csys to layer 40. I have created the journal which turn off the layer 40 and merged with main layer journal, working fine. But if that is revised in future and the person who is working on that file may on the layer 40, then again those datums are visible..(even i tried this). But in our view, we are asking your help in eliminating those virtual datum`s in journal collection. so, that it will only move the datums which are visible in part navigator..

Thanks & Regards,
Sam
 
Try this:

Code:
If sketchcol.ToArray().Length > 0 Then  
  For Each sk As Sketch In sketchcol  
    If (sk.Layer >39 or sk.Layer <40) Then
      ufs.Obj.SetLayer(sk.Tag, sketchlayer)  
    End If
    sk.Activate(False)
    sk.UpdateGeometryDisplay()
    sk.Deactivate(False, Sketch.UpdateLevel.SketchOnly)
  Next
End If


www.nxjournaling.com
 
Thanks Cowski, It is working..

But, It is working only for sketches..I tried to put the code in the same way for datums and csys, lines and arcs. Then it is showing an error..Please see the example how I tried for..lines.

Code:
 If linecol.ToArray().Length > 0 Then  
            For Each ln As Line In linecol  
                If ((ln.Layer >79 or ln.Layer <60) and (ln.Layer >256 or ln.Layer <241) and ln.Layer >1)  
                ufs.Obj.SetLayer(ln.Tag, linelayer)  
	      End If  
    ln.Activate(False)
    ln.UpdateGeometryDisplay()
    ln.Deactivate(False, Line.UpdateLevel.LineOnly)
  Next
End If


after running the code which you have given for sketches..It is working fine..But, datum planes and coordinate systems are visible. I think you have to edit the below code like you have done for sketches..

Code:
          For Each obj As DisplayableObject In workPart.Datums  
            If TypeOf obj Is DatumPlane Then  
                objArray(0) = obj  
                workPart.Layers.MoveDisplayableObjects(dplanelayer, objArray)  
            End If


Thanks & Regards,
Sam
 
If you have geometry (lines, arcs, etc) showing up after you run the journal, it is because the geometry was on an invisible layer and the journal moved it to a visible layer. Play with the journal recorder to see how to turn a layer on/off, then incorporate that into your journal code to turn off any layers you don't want to see.

www.nxjournaling.com
 
Thank you Cowski,

The Idea is good. But, the parts which we model here..It will surround to other users also. So, If that particular layer (generally we use to move all datumplanes and datumaxis to layer 40) was "ON" on their interface then, again all datums will visible.. Before we have a issue about sketches, datums and points. By using your code for sketches that issue was resolved for sketches only. Now, we are asking you to help us in the same way for datums and points too. Basing on your code I tried like below..If my approach is wrong please let me know..


Code:
         If datumplanecol.ToArray().Length > 0 Then
            For Each dplane As datumplane In datumplanecol
		If (dplane.Layer >49 or dplane.layer <40 and (dplane.layer >199 or dplane.layer <80)) Then
                ufs.Obj.SetLayer(dplane.Tag, dplanelayer)
		End If
	    Next
	End If
         
	
         If datumaxiscol.ToArray().Length > 0 Then
            For Each daxis As datumaxis In datumaxiscol
		If (daxis.Layer >49 or daxis.layer <40 and (daxis.layer >199 or daxis.layer <80)) Then
                ufs.Obj.SetLayer(daxis.Tag, daxislayer)
		End If
	    Next
	End If

and at the top I kept like this..

Code:
	Dim datumplanecol As datumplaneCollection = workpart.Datums
	Dim datumaxiscol As datumaxisCollection = workpart.Datums

But finally it showing " datumplaneCollection and datumaxisCollection is not defined"

I am not sure whether it is right or wrong..I just tried. If I succeeded then I can put the code below which you have given to sketches..

I am not familiar with journal coding. That`s why I am asking each and every thing. Thanks a lot for your patience. We are trying to customize our daily needs in to single click with your help.



Thanks & Regards,
Sam
 
shanmuk44 said:
So, If that particular layer (generally we use to move all datumplanes and datumaxis to layer 40) was "ON" on their interface then, again all datums will visible.

That's why I suggested turning the layer off in the journal (make it invisible). If the part is saved after the journal is run, the layer will be invisible for anyone that opens the part.

www.nxjournaling.com
 
Hi cowski,

I tried as per your comments..(please see attachments)

I created a journal to turnoff the layer 40, and this makes all datums invisible. The same part i opened in another user, even it is invisible.
But, When we turn on layer 40 it looks like in image which is in attachment.

We created one datum which was highlighted in part navigator. If you see the image there are other virtual datums marked in black color which are made visible by journal..and these virtual datums also moving to layer 40. But, my question is why it is not collecting datums which are in part navigator ?.
If it is doing so then this issue wont arise. Please correct me if I am wrong. How can we resolve this issue ?

we are eagerly Waiting for your reply with a great solution.





Thanks & Regards,
Sam
 
 http://files.engineering.com/getfile.aspx?folder=f70b8c75-c0d2-41ba-ad9e-c4e00deedbaa&file=Image.JPG
One solution to this problem is to check the parent of the datum plane before you move it. If the parent is a tab feature, don't move it. This code will solve the problem for sheet metal tab features. You may find other features that lead to similar results. If/when that happens, you'll have to add them as an exception similar to what this code does for tab features.

There is probably a more elegant way to handle this situation, but this is the first that came to mind.

Code:
Option Strict Off
Imports System
Imports System.Collections
Imports NXOpen
Imports NXOpen.UF
Imports NXOpen.Utilities
Imports NXOpen.Assemblies
Imports NXOpen.Features

Module layermove

    Sub Main()

        Dim s As Session = Session.GetSession()
        Dim lw As ListingWindow = s.ListingWindow
        Dim ufs As UFSession = UFSession.GetUFSession()
        Dim workPart As Part = s.Parts.Work
        lw.Open()

        Dim displaypart As Part = s.Parts.Display

        Dim pointcol As PointCollection = workPart.Points
        Dim linecol As LineCollection = workPart.Lines
        Dim arccol As ArcCollection = workPart.Arcs
        Dim splinecol As SplineCollection = workPart.Splines
        Dim sketchcol As SketchCollection = workpart.Sketches
        Dim bodycol As BodyCollection = workpart.Bodies
        Dim allComp1 As ArrayList = New ArrayList

        Dim objArray(0) As DisplayableObject

        Dim pointslayer As Integer = 90
        Dim linelayer As Integer = 90
        Dim arclayer As Integer = 90
        Dim coniclayer As Integer = 90
        Dim splinelayer As Integer = 90
        Dim csyslayer As Integer = 100
        Dim daxislayer As Integer = 40
        Dim dplanelayer As Integer = 40
        Dim bodylayer As Integer = 1
        Dim sketchlayer As Integer = 40

        If pointcol.ToArray().Length > 0 Then
            For Each pt As Point In pointcol
                If (pt.Layer > 79 Or pt.Layer < 60) Then
                    ufs.Obj.SetLayer(pt.Tag, pointslayer)
                End If
            Next
        End If

        If linecol.ToArray().Length > 0 Then
            For Each ln As Line In linecol
                If ((ln.Layer > 79 Or ln.Layer < 60) And (ln.Layer > 256 Or ln.Layer < 241) And ln.Layer > 1) Then
                    ufs.Obj.SetLayer(ln.Tag, linelayer)
                End If
            Next
        End If

        If arccol.ToArray().Length > 0 Then
            For Each arc1 As Arc In arccol
                If (arc1.Layer > 79 Or arc1.Layer < 60) Then
                    ufs.Obj.SetLayer(arc1.Tag, arclayer)
                End If
            Next
        End If

        If splinecol.ToArray().Length > 0 Then
            For Each sp As Spline In splinecol
                If (sp.Layer > 79 Or sp.Layer < 60) Then
                    ufs.Obj.SetLayer(sp.Tag, splinelayer)
                End If
            Next
        End If

        If bodycol.ToArray().Length > 0 Then
            For Each sb As Body In bodycol
                If sb.Layer > 19 Then
                    ufs.Obj.SetLayer(sb.Tag, bodylayer)
                End If
            Next
        End If


        For Each obj As DisplayableObject In workPart.Datums
            If TypeOf obj Is DatumPlane Then

                Dim junk As DatumPlane = obj
                If junk.Feature.FeatureType.ToString = "DATUM_PLANE" Then
                    Try
                        Dim parentFeat As Features.Feature() = junk.Feature.GetParents
                        If parentFeat(0).GetFeatureName.Contains("SB Tab") Then
                            Continue For
                        End If
                    Catch ex As Exception

                    End Try
                End If


                objArray(0) = obj
                workPart.Layers.MoveDisplayableObjects(dplanelayer, objArray)
            End If

            If TypeOf obj Is DatumAxis Then
                objArray(0) = obj
                workPart.Layers.MoveDisplayableObjects(daxislayer, objArray)
            End If
        Next

        If sketchcol.ToArray().Length > 0 Then
            For Each sk As Sketch In sketchcol
                If (sk.Layer > 39 Or sk.Layer < 40) Then
                    ufs.Obj.SetLayer(sk.Tag, sketchlayer)
                End If
                sk.Activate(False)
                sk.UpdateGeometryDisplay()
                sk.Deactivate(False, Sketch.UpdateLevel.SketchOnly)
            Next
        End If

        Dim coniccol(-1) As Tag
        Dim conictype As Integer = 6
        Dim conictag As Tag = Tag.Null
        Dim count As Integer = 0

        ufs.Obj.CycleObjsInPart(workPart.Tag, conictype, conictag)
        While conictag <> Tag.Null
            ReDim Preserve coniccol(count)
            coniccol(count) = conictag
            count += 1
            ufs.Obj.CycleObjsInPart(workPart.Tag, conictype, conictag)
        End While


        If coniccol.Length > 0 Then
            For i As Integer = 0 To coniccol.Length - 1
                ufs.Obj.SetLayer(coniccol(i), coniclayer)
            Next
        End If

        Dim csyscol(-1) As Tag
        Dim csystype As Integer = 45

        Dim csystag As NXOpen.Tag = Tag.Null
        count = 0

        ufs.Obj.CycleObjsInPart(workPart.Tag, csystype, csystag)
        While csystag <> Tag.Null
            ReDim Preserve csyscol(count)
            csyscol(count) = csystag
            count += 1
            ufs.Obj.CycleObjsInPart(workPart.Tag, csystype, csystag)
        End While
        If csyscol.Length > 0 Then
            For i As Integer = 0 To csyscol.Length - 1
                ufs.Obj.SetLayer(csyscol(i), csyslayer)
            Next
        End If

        'move symbolic thread arcs to layer 1
        For Each myFeature As Feature In workPart.Features
            If myFeature.FeatureType = "SYMBOLIC_THREAD" Then
                For Each myEnt As Arc In myFeature.GetEntities
                    myEnt.Layer = 1
                    myEnt.RedisplayObject()
                Next
            End If
        Next

        Dim root As Component = s.Parts.Display.ComponentAssembly.RootComponent
        If Not IsNothing(root) Then
            getAllComponents2(root, allComp1)
            Dim dispobj As DisplayableObject = Nothing
            Dim cnt1 As Integer = allComp1.Count
            Dim objectArray1(cnt1 - 1) As DisplayableObject
            Dim objlayer As Integer = Nothing
            Dim cnt2 As Integer = 0
            For i As Integer = 0 To cnt1 - 1
                dispobj = DirectCast(allComp1(i), DisplayableObject)
                objlayer = dispobj.Layer
                If objlayer > 19 Then
                    ReDim Preserve objectArray1(cnt2)
                    objectArray1(cnt2) = allComp1(i)
                    cnt2 += 1
                End If
            Next
            If cnt2 > 0 Then
                displaypart.Layers.MoveDisplayableObjects(1, objectArray1)
            End If
        End If

        lw.Close()
        'msgbox("done")

    End Sub

    Sub getAllComponents2(ByVal comp As Component, ByRef allComp As ArrayList)
        Dim child As Component = Nothing
        Dim space As String = Nothing
        For Each child In comp.GetChildren()
            allComp.Add(child)
            getAllComponents2(child, allComp)
        Next
    End Sub


    Public Function GetUnloadOption(ByVal dummy As String) As Integer

        'Unloads the image immediately after execution within NX
        GetUnloadOption = NXOpen.Session.LibraryUnloadOption.Immediately

    End Function

End Module

www.nxjournaling.com
 
Hi Cowski,

Thanks for your effort. It is just awesome. Thank you very much.

After running your code.. Still we faced that problem for flanges. Later we tried trail and error method. Just only small change we have done.
Now it is working fine.. Really thank you very much.

cowski said:
Dim parentFeat As Features.Feature() = junk.Feature.GetParents
If parentFeat(0).GetFeatureName.Contains("SB Tab") Then

This we changed to:

Code:
Dim parentFeat As Features.Feature() = junk.Feature.GetParents
                        If parentFeat(0).GetFeatureName.Contains[b](" ")[/b] Then

Thanks & Regards,
Sam
 
In my response dated: 17 Apr 13 9:38 in thread561-341877, I gave you some code demonstrating how to use both the listing window and message boxes. If you like the message boxes and want more info on them, see the article at:
Try out some code and work through it; post back with specific questions (and the code you have so far), I'll be happy to answer them.

www.nxjournaling.com
 
Hi cowski,

This is another issue. We are using the below journal for finding entire part reference set and replacing that entire part with s reference set. In any top level assembly.
And this journal search for child components also..

Now, I need to remove child components from this journal. Means it is enough to replace the entire part reference set at that level. No need to
search for child components.

Code:
Option Strict Off

Imports System
Imports System.Collections
Imports NXOpen
Imports NXOpen.Assemblies
Imports NXOpen.UF
Imports NXOpenUI


Module ReportReferenceSet



    Dim s As Session = Session.GetSession()
    Dim ufs As UFSession = UFSession.GetUFSession()
    Dim lw As ListingWindow = s.ListingWindow
    Dim displaypart As Part = s.Parts.Display
    Dim theUISession As UI = UI.GetUI
    Dim response As Integer
    Dim answer As String = "" 
         

    Sub Main()
        Dim allComp1 As ArrayList = New ArrayList
        Dim displaypart As Part = s.Parts.Display
        lw.Open()
        Dim root As Component = s.Parts.Display.ComponentAssembly.RootComponent
        getAllComponents2(root, allComp1)
        Dim referenceSet1 As String = "Entire Part"
        Dim referenceSet2 As String = "S"
        reportComponentReferenceSet(allComp1, referenceSet1)
        ChangeComponentReferenceSet(allComp1, referenceSet1, referenceSet2)
    End Sub
    Sub reportComponentReferenceSet(ByVal allComp1 As ArrayList, ByVal referenceSet1 As String)
        For Each comp As Component In allComp1
            If comp.ReferenceSet = referenceSet1 Then
                lw.WriteLine(comp.Name & " " & comp.ReferenceSet)
            End If
        Next
    End Sub
    Sub ChangeComponentReferenceSet(ByVal allComp1 As ArrayList, ByVal referenceSet1 As String, _
                                    ByVal referenceSet2 As String)
        Dim errorList1 As ErrorList
        Dim comp1(0) As Component
        For Each comp As Component In allComp1

            If comp.ReferenceSet = referenceSet1 Then
                comp1(0) = comp
                errorList1 = displaypart.ComponentAssembly.ReplaceReferenceSetInOwners(referenceSet2, comp1)
            End If
        Next
    End Sub
    Sub getAllComponents2(ByVal comp As Component, ByRef allComp As ArrayList)
        Dim child As Component = Nothing
        Dim space As String = Nothing
        For Each child In comp.GetChildren()
            allComp.Add(child)
            getAllComponents2(child, allComp)
        Next
    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

Thanks & Regards,
Sam
 
Comment out or delete the highlighted line of code.

Code:
[COLOR=blue]Sub[/color] getAllComponents2(ByVal comp [COLOR=blue]As[/color] Component, [COLOR=blue]ByRef[/color] allComp [COLOR=blue]As[/color] ArrayList)  
	Dim child [COLOR=blue]As[/color] Component [COLOR=blue]= Nothing[/color]  
	Dim space [COLOR=blue]As String = Nothing[/color]  
	For [COLOR=blue]Each[/color] child [COLOR=blue]In[/color] comp.GetChildren()  
		allComp.Add(child)  
		  [highlight #FCE94F][COLOR=green]'getAllComponents2(child, allComp)[/color][/highlight]
	Next  
End [COLOR=blue]Sub[/color]


www.nxjournaling.com
 
Hi Cowski,

May I know what skills required to be familiar with UGNX Customization.

Thanks & Regards,
Sam
 
NX customization is a large topic that covers everything from installation to custom applications. You should open that question up to the entire forum for a good cross section of answers...

In the context of this thread, I assume you are asking specifically about journal programming. A basic understanding of programming concepts is required: variables, arrays, conditional testing, branching, and loops. The next step is breaking your code into manageable chunks (functions and/or subroutines) and beyond that - object oriented programming (OOP). A good understanding of what NX is capable of helps as does knowing where the help files are for the NXOpen API as well as a good reference for your language of choice.

www.nxjournaling.com
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor