Search - User list
Full Version: Utilising @wedgenum[] in file output for nested wedges
Root » PDG/TOPs » Utilising @wedgenum[] in file output for nested wedges
Dominic Carus
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
tpetrick
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.
Dominic Carus
Brilliant, that works perfectly. Thanks!

I feel that this note regarding parm expressions would be helpful if included with the wedge TOP docs.
papsphilip
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
This is a "lo-fi" version of our main content. To view the full version with more information, formatting and images, please click here.
Powered by DjangoBB