Utilising @wedgenum[] in file output for nested wedges

   3354   3   2
User Avatar
Member
15 posts
Joined: April 2013
Offline
Hey,
I'm currently trying to process some geometry using nested wedges.
Dropping `@wedgenum` in the file path of the rop, creates the expected latest wedge number value, but I need to use the array @wedgenum as described in the help page [www.sidefx.com] in order to get usable unique indices for my geometry.

Putting `@wedgenum` in the file path does not evaluate to anything - am I misunderstanding how this is supposed to work?

Dominic
User Avatar
Staff
585 posts
Joined: May 2014
Offline
The parm expressions don't have syntax for accessing the entire array. You can only access the components of the attribute using a particular index such as @wedgenum.0, @wedgenum.1, etc. Alternatively, you can use the function equivalent – pdgattribute(“wedgenum”, 2) to access the element at index 2 for example.

Wedgenum is also not an array by default - you'll need to toggle the “Preserve Wedge Numbers” option on each of the wedge node(s). Each wedge will append the wedgenum value on the end of the existing array when that option is on, rather than overwriting the single, scalar value.

For a file path, you might do something like $HIP/$OS.`@wedgenum.0`.`@wedgenum.1`.$F4.bgeo.sc.
Edited by tpetrick - Jan. 14, 2020 17:41:02
User Avatar
Member
15 posts
Joined: April 2013
Offline
Brilliant, that works perfectly. Thanks!

I feel that this note regarding parm expressions would be helpful if included with the wedge TOP docs.
User Avatar
Member
385 posts
Joined: July 2018
Offline
this is not working for me.

1)for some reason wedgenum finds its way into the name even though i didnt put it there

2) as you can see from the screenshot its not outputting the correct test name and its throwing me an error

Attachments:
1.jpg (171.7 KB)

  • Quick Links