Hi Ciaran,
You can parse the connection stack xml to get that info, here is a quick
snippet:

import xml.etree.ElementTree as ET
from win32com.client import Dispatch
si = Dispatch("XSI.Application")
siut = Dispatch("XSI.Utils")


def listConnections(obj, conn_type="out"):
    result = list()
    data = siut.DataRepository.GetConnectionStackInfo(obj)
    for c in ET.fromstring(data):
        if c.find("object") is not None and c.find("type").text ==
conn_type:
            result.append(c.find("object").text)
    return result

# TEST
si.NewScene(None, False)
a = si.ActiveSceneRoot.AddNull()
b = si.ActiveSceneRoot.AddNull()
b.posx.Value = 5
a.Parameters("Size").AddExpression(b.Parameters("Size").FullName)
print listConnections(b.ActivePrimitive)


Hope this helps,
Cheers

Reply via email to