Jump to content
radurock

VEX Wrangle Attribute ptnum hidden

Recommended Posts

Hey,

Probably stupid question but I'm trying to filter my impact data based on some attributes it has on it.

for example i run this in a point wrangle

if(@otherobjid == 0)
    {
    removepoint(0,@ptnum);
    }

The erorr i get is "Attribute is hiding global ptnum" . Any particular reason why it's doing that?

Thanks

Radu

Share this post


Link to post
Share on other sites

that should work, are you running the attribute wrangle in point mode?

The error suggests you may be running it in detail mode.

Edited by acey195

Share this post


Link to post
Share on other sites

Seems like some kind of context lock.

Maybe try grouping them instead and then follow up the wrangle with a delete node on the group?

if (i@otherobjid == 0){
	@group_pointsToRemove = 1;
}

 

Edited by Atom
  • Like 1

Share this post


Link to post
Share on other sites

From the top of my head since I can't check right now but from what I recall, the attribute ptnum is returned by the impact Dop Import Records, it conflicts with the global @ptnum attribute we are used to type in a wrangle.
Mid click the impact Dop Import to double check but you should see ptnum in the list. I reckon renaming it before your point wrangle should be enough to make it work. There's a more elegant way to keep everything as it is but I can't remember it right now.

  • Like 1

Share this post


Link to post
Share on other sites
On 9/5/2016 at 2:13 AM, iamyog said:

From the top of my head since I can't check right now but from what I recall, the attribute ptnum is returned by the impact Dop Import Records, it conflicts with the global @ptnum attribute we are used to type in a wrangle.
Mid click the impact Dop Import to double check but you should see ptnum in the list. I reckon renaming it before your point wrangle should be enough to make it work. There's a more elegant way to keep everything as it is but I can't remember it right now.

THIS - WOW ! thank you for replying with this, because it was driving me nutz trying to figure out what was so bad about that simple expression. 

 

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

×