Cancel
Showing results for 
Search instead for 
Did you mean: 

import JT directly into teamcenter under item revison

Pioneer
Pioneer

hello all,

 

we are doing PMI of assemblies, but we can't export JT directly under item revison.

we are following below steps:

 

In TC
Create a new item.
Open the item and select the item revision.
File-New-Dataset or CTRL-D
Select the More button and select DirectModel.
Select the ... on import.
Select your jt file.
You may need to select Directmodel from the list on the left again.
Select OK.
Your jt file will be imported into the item revision.
I just double click the jt data set and it opens my viewer externally.

 

can we automate this process, means directly save JT of assemblies under item revison, with all PMI data.

 

thanks.

 

NX11,TC11

7 REPLIES 7

Re: import JT directly into teamcenter under item revison

Siemens Phenom Siemens Phenom
Siemens Phenom

Hi @FORZINDI 

There is a sample program available in solution center as import jt to teamcenter as new dataset

Re: import JT directly into teamcenter under item revison

Siemens Phenom Siemens Phenom
Siemens Phenom

@FORZINDI ,

 

Did you try:

 

  • Turn on "Save JT Data" and "Save 3d Annotations" option  in  File -> Save -> Save Options.
  • And then use File -> Save -> Force Save All. This will create JT using default JT preferences.

Regards,
Samadhan

GTAC | NX Help: NX1102 | NX1202 | NX1847
Please mark post as an "Accepted Solution", if it answers your question/is more helpful!

Re: import JT directly into teamcenter under item revison

Pioneer
Pioneer

@GaneshKadole looks like i don't have access to the solution page. how can i see ?

Re: import JT directly into teamcenter under item revison

Pioneer
Pioneer

@SamadhanGaikwad NX does't save JT of assemblies.

Re: import JT directly into teamcenter under item revison

Siemens Phenom Siemens Phenom
Siemens Phenom

@FORZINDI wrote:

@GaneshKadole looks like i don't have access to the solution page. how can i see ?


Use your webkey username and password.

Re: import JT directly into teamcenter under item revison

Siemens Esteemed Contributor Siemens Esteemed Contributor
Siemens Esteemed Contributor

@FORZINDI wrote:

@SamadhanGaikwad NX does't save JT of assemblies.


It does if you set the following variable:

UGII_GENERATE_MULTI_CAD_JT=1

 

Regards, Ben

Ben Broad | PLM Enthusiast | Siemens GCSS

NX (v17 - 1872) | Teamcenter (9 - 12)
Value Based Licensing | Adaptive UI | BETA Registration

Re: import JT directly into teamcenter under item revison

Pioneer
Pioneer

@GaneshKadole @SamadhanGaikwad 

 

i have modified that code which was present in solution center, but getting  following error

 

error.JPG

 

using this code

Imports System
Imports NXOpen
Imports NXOpen.PDM

Public Class NXJournal
    Public Shared Sub Main(ByVal args As String())
        Dim theSession As Session = NXOpen.Session.GetSession()
        Dim lw As ListingWindow = theSession.ListingWindow
        Dim fileMgt As FileManagement = theSession.PdmSession.NewFileManagement()
        Dim itemIds As String() = New String(0) {}
        Dim itemRevisionIds As String() = New String(0) {}
        Dim datasetNames As String() = New String(0) {}
        Dim datasetTypeNames As String() = New String(0) {}
        Dim datasetRelationTypeNames As String() = New String(0) {}
        Dim datasetToolNames As String() = New String(0) {}
        Dim fileType As Boolean() = New Boolean(0) {}
        Dim namedReferenceNames As String() = New String(0) {}
        Dim importFileNames As String() = New String(0) {}
        Dim importFileDirectoryNames As String() = New String(0) {}
        itemIds(0) = "DB_PART_NO"
        itemRevisionIds(0) = "DB_PART_REV"
        datasetNames(0) = "jt_test"
        datasetTypeNames(0) = "DirectModel"
        datasetRelationTypeNames(0) = "IMAN_Rendering"
        datasetToolNames(0) = "PV"
        fileType(0) = True
        namedReferenceNames(0) = "JTPART"
        importFileNames(0) = "test.jt"
        importFileDirectoryNames(0) = "C:\temp\Import"
        Dim importResults As Integer() = fileMgt.ImportFilesAndCreateDatasets(itemIds, itemRevisionIds, datasetNames, datasetTypeNames, datasetRelationTypeNames, datasetToolNames, fileType, namedReferenceNames, importFileNames, importFileDirectoryNames)
        lw.Open()

        For Each i As Integer In importResults

            If i = 0 Then
                lw.WriteLine("Successfully imported:")
                lw.WriteLine(" importFileDirectoryNames = " & importFileDirectoryNames(i))
                lw.WriteLine(" importFileNames = " & importFileNames(i))
            Else
                lw.WriteLine("Import failed:")
                lw.WriteLine(" importFileDirectoryNames = " & importFileDirectoryNames(i))
                lw.WriteLine(" importFileNames = " & importFileNames(i))
            End If
        Next
    End Sub

    Public Shared Function GetUnloadOption(ByVal dummy As String) As Integer
        Return CInt(NXOpen.Session.LibraryUnloadOption.Immediately)
    End Function
End Class

 please suggest how to solve.

 

thanks.