Jump to content
Sign in to follow this  

Does "primgroup" in class makes sense in findattribval() ?

Recommended Posts

it's not a group scope, its literally for treating groups like an attribute

so if you say... "prim", "attribname", value ... it will find @primnum whose attribname value is the same as your value

and ... "primgroup", "groupname", value ... will find @primnum whose grupname membership is the same as your value (0 or 1)

so in your case I'd assume you'd do:

findattribval(0, "primgroup", "prims", 1) ;

however it doesn't seem to do what it says, I'd assume it'll give you 2 as that is the first @primnum with the prims group of value 1, but I was always getting -1, it feels like a bug

you can always use 

expandprimgroup(0, "prims")[0];

even though it may be slower


However I assume you were hoping for group scope to limit which prims the findattribval() is searching, so I'm afraid that's not implemented

Edited by anim

Share this post

Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
Sign in to follow this