Access string array element from parameter expression

   1462   2   0
User Avatar
Member
2 posts
Joined: 10月 2013
Offline
Hi all,


I'm struggling to find an easy solution to this simple problem: how can I read a string array from a string array attribute, let's say from detail?
I can do it easily with float, int or vector, but I can't find it with string.

Thanks!
User Avatar
Member
2551 posts
Joined: 6月 2008
Offline
There is an alternate function for fetching strings "details". The S does not mean plural, it means it returns a string.
https://www.sidefx.com/docs/houdini/expressions/details.html [www.sidefx.com]
Using Houdini Indie 20.0
Windows 11 64GB Ryzen 16 core.
nVidia 3050RTX 8BG RAM.
User Avatar
Member
1 posts
Joined: 12月 2017
Offline
I wanted to do the same thing myself.
The pythonexprs function was used to achieve the following

`pythonexprs('hou.node("../python1/").geometry().attribValue("str_array")[hou.node("../foreach_count1/").geometry().attribValue("iteration")]')`
  • Quick Links