Send command and how to read work_item data

   1436   2   1
User Avatar
Member
65 posts
Joined: Feb. 2013
Online
Hi guys,

I'd like to understand how to read attribute attached to a work_item from a “sendcommand” node.

For example:
I have a “houdiniserver”,connected to an “attributecreate”, connected to a “sendcommand”.
The “attributecreate” node has 1 string attribute, with ‘name’ as stringname1 and ‘Marco’ as stringvalue1.
The problem is: how can I read stringvalue1 in the “sendcommand” node.

I tried work_item.stringData('name', 0) … work_item.data.stringData('name', 0) … work_item.data('name', 0) … hou.parm('../path/to/attrib') but I can't get that data.

Is there any concept that inhibit that flow of data?

Thanks in advance,
Marco
User Avatar
Member
603 posts
Joined: Sept. 2016
Offline
Try this:

s = strData(work_item, 'stringname1', 0)
User Avatar
Member
65 posts
Joined: Feb. 2013
Online
chrisgreb
Try this:

s = strData(work_item, 'stringname1', 0)

Thanks a lot Chris!
  • Quick Links