cancel
Showing results for 
Search instead for 
Did you mean: 

NXOpen Remoting - NX10 & ugmgr.AskConfiguredRev

Valued Contributor
Valued Contributor

I'm currently updating all of our custom code that runs in NX8.5 to ensure it's compatible when we upgrade to NX10.

I'm having a specifiec issue with some custome code that uses remoting that works fine for the same file without using remoting.  It also works without issues in NX8.5 with remoting.

 

I have a section of code that looks up the latest revision of a file from tceng that looks like this:

Function get_rev(ByVal part_name As String) As String
        Dim ufs As UFSession
        ufs = Activator.GetObject(GetType(UFSession), "http://localhost:1234/UFSession")

        Dim rev_tag As Tag
        Dim part_tag As Tag
        Dim rev_string As String
        ufs.Ugmgr.AskPartTag(part_name, part_tag)

        If part_tag <> NXOpen.Tag.Null Then
            Try

           
                MsgBox(part_tag)
                ufs.Ugmgr.AskConfiguredRev(part_tag, rev_tag)

            ufs.Ugmgr.AskPartRevisionId(rev_tag, rev_string)
            Catch ex As Exception
                MsgBox(ex.InnerException.ToString)
                rev_string = "01"
            End Try
        Else
            rev_string = "00"
        End If
        get_rev = rev_string



    End Function

the first call to ufs.ufmgr.askparttag seems to work and gives me a tag back (first msgbox)

 

it then fails on the ugmgr.askconfiguredrev with an inner exception of:

-----------------------------------------------------------------

system.runtime.remotingexception: The argument type '90171' cannot be converted into parameter type 'NXOpen.tag'

etc..

etc..

-----------------------------------------------------------------

where '90171' is the part_tag

 

I'm running .net framework 4.5.2

 

Has this already been rasied as an issue and does anyone know of any workarounds?

 

Thanks in advance.

1 REPLY
Highlighted

Re: NXOpen Remoting - NX10 & ugmgr.AskConfiguredRev

Valued Contributor
Valued Contributor

To close the loop on this.

This turned out to be a .net framework installation issue.