anicg 12 Posted February 12 I attach the hip file where I have a simple grid but I need to divide using the area (e.g. area/12), I get an error "Local variable 'area' not found. " although I'm using a measure sop that creates an area attribute. Any idea? area_divide.hiplc Share this post Link to post Share on other sites
Atom 1,468 Posted February 12 (edited) Very few of the nodes, allow you to reference vex attributes inside the parameter fields. The @ prefix is a vex construct, but the parameter fields for each node executes hScript. You can still reference an attribute using an hScript function, like this. prim("../measure1",0,"area",0)/12 The function reaches into the measure1 sop and grabs the value of @area for primitive #0. You may see the immediate problem with this approach. What if you have multiple primitives with different areas? How do you know which primitive to chose the value from? Edited February 12 by Atom 1 Share this post Link to post Share on other sites
ParticleSkull 109 Posted February 15 You may see the immediate problem with this approach. What if you have multiple primitives with different areas? How do you know which primitive to chose the value from? Exactly! And in some situations it's a good idea to promote the area attribute to detail, using the Sum of all primitives area I can see you have only one poligon so you shouldn't worry about and just the 0 one I added the 2 exemplos to your file: area_divide.hiplc Share this post Link to post Share on other sites