Nice idea, thanks! I ended up just parsing all inputports of the scene's expression nodes, but your technique definitely will be useful to find outputs of any type.
Ciaran On Fri, Apr 11, 2014 at 5:50 PM, Cesar Saez <[email protected]> wrote: > 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 >

