The attrib() function doesn't return anything in a POP wrang

   811   3   1
User Avatar
Member
7 posts
Joined: Dec. 2016
Offline
In a Vellum solver, I want to read a detail attribute in a POP wrangle.
No matter what I try, neither the attribnor the detailfunction returns the correct value, it always acts as if the given attribute doesn’t exist.
On the other hand, setdetailattribworks without issue and successfully sets attributes at the detail level with the same values.

I've tried both POP and Geometry wrangles, but the result is the same.

i@is_exist; 
i@read_existence_check_attrib = getattrib(0, 'detail', 'my_detail_attrib', 0, @is_exist);
i@read_existence_check_detail = detailattrib(0, 'my_detail_attrib', 0, @is_exist);

// setattrib is working
setdetailattrib(0, 'set_test', 1000);

Attachments:
read_detail.png (274.1 KB)
detail_function_DOP.hiplc (530.7 KB)

User Avatar
Member
542 posts
Joined: Nov. 2016
Offline
In the Inputs tab of your pop_wrangle, set input1 to First Context Geometry.
User Avatar
Member
7 posts
Joined: Dec. 2016
Offline
Thank you, that was the problem.
But this makes me curious, why can the setdetailattribwork without a defined input?
User Avatar
Member
542 posts
Joined: Nov. 2016
Offline
I suggest this article, it'll explain it better than I could:
https://www.toadstorm.com/blog/?p=1046 [www.toadstorm.com]
  • Quick Links