[MAX Python] unable to append node to customAtt

trying to attach nodes to a customAttribute

first setup using maxscript

CA = attributes CAdata
(
parameters main
	(
	nodeRefs type:#maxObjectTab tabSize:0 tabSizeVariable:true
	)
)

CustAttributes.add $Point001 CA
$Point001.nodeRefs

then attached a node using python

node = MaxPlus.INode.GetINodeByName('Point001')
nodeREF = MaxPlus.INode.GetINodeByName('Teapot001')
node.BaseObject.GetCustomAttributeContainer()[0].GetParameterBlock().nodeRefs.Value.Append(nodeREF)
#I also tried 
node.BaseObject.GetCustomAttributeContainer()[0].GetParameterBlock().nodeRefs.Value.Append(nodeREF.GetReference(1))
#both of these return #success

but when I do “GetCount()” on the customAtt it returns 0 and I can see it hasn’t actually attached the node

K so create an INodeList, append the object to that and assign that to the objectTab attribute

nodeList = MaxPlus.INodeList()
nodeList.Append(nodeREF)

node.BaseObject.GetCustomAttributeContainer()[0].ParameterBlock.nodeRefs.Value = nodeList

I dont know what others’ practices are, but I never directly reference a node in a MaxObject or MaxObjectTab param. I always put it inside a nodetransformmonitor to avoid dependency loops and keep Max speed up. It’s marginally slower when calling it, but you are not constantly sending messages back and forth when nodes are updated like in a nodetab.