Hi @bentraje,
I tried your code, and it is working as expected. I tested on 2023.0 and 2023.1

I am using the same code as in the other thread you provided.
I must emphasis here that searching nodes by name should be used carefully. This is the case where you can use it, as you define the node name. But remember that we can change the Nodes name, and it depends on the language chosen by the user.
Cheers,
Manuel
import c4d
import maxon
def main():
# Retrieve the selected BaseMaterial
mat = doc.GetActiveMaterial()
if mat is None:
raise ValueError("There is no selected BaseMaterial")
# Retrieve the reference of the material as a node material.
nodeMaterial = mat.GetNodeMaterialReference()
if nodeMaterial is None:
raise ValueError("Cannot retrieve node material reference")
# Retrieve the current node space Id
nodespaceId = c4d.GetActiveNodeSpaceId()
# Retrieve the Nimbus reference for a specific node space
nimbusRef = mat.GetNimbusRef(nodespaceId)
if nimbusRef is None:
raise ValueError("Cannot retrieve the nimbus ref for that node space")
# Retrieve the graph corresponding to that node space.
graph = nimbusRef.GetGraph()
if graph is None:
raise ValueError("Cannot retrieve the graph of this nimbus ref")
# Get the root of the GraphNode
root = graph.GetRoot()
# Retrieve all nodes, child of the root node
nodes = []
root.GetChildren(nodes, maxon.NODE_KIND.NODE)
# Create a list of the selected ones.
selectedNodes = []
maxon.GraphModelHelper.GetSelectedNodes(graph, maxon.NODE_KIND.NODE, selectedNodes)
# Group all the selected nodes in an empty node.
groupRoot = maxon.GraphNode()
# To modify a graph, modification must be done inside a transaction. After
# modifications are done, the transaction must be committed.
with graph.BeginTransaction() as transaction:
scale_node = graph.AddChild("", "net.maxon.node.type", maxon.DataDictionary())
scale_node.SetValue(maxon.NODE.BASE.NAME, maxon.String("scale_node"))
input_node = []
maxon.GraphModelHelper.FindNodesByName(graph, "scale_node", maxon.NODE_KIND.ALL_MASK, maxon.PORT_DIR.INPUT, True, input_node)
print (input_node) # Should give me the Value Node named scale node. Instead Gives me an empty list. Already tried all the PORT_DIR options. Still gives me an empty list.
#groupRoot = graph.MoveToGroup(groupRoot, maxon.Id("idOfMyGroup"), selectedNodes)
#maxon.GraphModelHelper.CreateInputPort(groupRoot, "someid", "new port name")
transaction.Commit()
# Pushes an update event to Cinema 4D
c4d.EventAdd()
if __name__ == "__main__":
main()