views:

22

answers:

0

IUgRemoting.dll

namespace test
{
    public interface IUgRemoting
    {
        Session GetSession();
        UFSession GetUFSession();
        UI GetUI();
    }
}

I test in C#

        var loader = (IUgRemoting)Activator.GetObject(typeof(IUgRemoting), "ipc://test/test.ShareClass");

            var theSession = loader.GetSession();

it's OK. But, in ironpython, like this, have some erros.

clr.AddReferenceToFileAndPath(r'E:\MyDocuments\VS2010\ex_vs10_ug remoting\IUgRemoting\bin\Debug\IUgRemoting.dll')
from System import *
import test
from test import *
class NXOperators(object):
    def __init__(self):
        tmp= Activator.GetObject(IUgRemoting, "ipc://test/test.ShareClass")
        self.theSession=tmp.GetSession()//error!

What's worng?

Thakns