fatboYYY Posted December 9, 2016 Share Posted December 9, 2016 Hey guys, I've been wondering this for quite some while, but always managed to find a workaround. I am not sure if I will be able to find one this time. As an example: Why does the test attribute not reflect the pointnumber attribute here? (Any input-geo with points is sufficient) for(int i = 0; i <npoints(0); i++) { if(@ptnum == point(0,"ptnum",i)) i@test = 1; } Am I just calling the pointattribute wrong here, or is it not possible to get the pointattribute back through the point() function. What other option do I have to get return the pointattribute in a custom loop? Thanks in advance. Quote Link to comment Share on other sites More sharing options...
dimovfx Posted December 9, 2016 Share Posted December 9, 2016 I tried with i@test = point(0, "ptnum", @ptnum); and it does return 0. Why ... have no Idea, but since you already know the number of the point you are calling, I don't see the point of requesting the point number. Quote Link to comment Share on other sites More sharing options...
haggi Posted December 9, 2016 Share Posted December 9, 2016 I suppose the reason is that @ptnum is not a real point attribute but a global point wrangle variable. Quote Link to comment Share on other sites More sharing options...
dimovfx Posted December 9, 2016 Share Posted December 9, 2016 but if you really need to know the point number that way, you can set different attribute beforehand (in separate wrangle) i@id = @ptnum; and use @id instead @ptnum 1 Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.