Dag Posted March 6, 2023 Share Posted March 6, 2023 Hi, how can I change the value of string parameter in the building from patterns node with an attribute? I have an attribute wrangle that set the value of different patterns in the relation of a building I feed in but how can I set the pattern string to the according place? For example I want school, public, church as buildings and they have already a name and detail attribute building on them so I have a switch it is controlled by attribute wrangle to switch for the right building type so far so good. But the different buildings can have different patterns how they are build and I want to set this pattern in the building from patterns node. Alternatively I could set this string to the attr. wrangle channel and set it as relative reference in this pattern node - but how??? Thanks!!! Quote Link to comment Share on other sites More sharing options...
fencer Posted March 7, 2023 Share Posted March 7, 2023 If I understood you need to read detail attribute and use it in "Pattern" field of Labs, also split "pattern" into two values "BaseWall" and "Floor01": detail("../NULL", "pattern_group", 0) detail("../NULL", "pattern_pattern", 0) Try to split string with split function or so by symbol "<". Quote Link to comment Share on other sites More sharing options...
Dag Posted March 7, 2023 Author Share Posted March 7, 2023 (edited) Hi, the problem is this field does not recognize the expression when I put e.g. @pattern or `detail("../NULL", "pattern", 0)` I would like to set the parameter in the wrangle like this setattrib(0, "detail", "pattern_node", s@pattern, @ptnum);but it does work. Edited March 7, 2023 by Dag Quote Link to comment Share on other sites More sharing options...
fencer Posted March 7, 2023 Share Posted March 7, 2023 9 hours ago, Dag said: Hi, the problem is this field does not recognize the expression when I put e.g. @pattern or `detail("../NULL", "pattern", 0)` I would like to set the parameter in the wrangle like this setattrib(0, "detail", "pattern_node", s@pattern, @ptnum);but it does work. Create a new wrangle with test detail attribute s@test = "name"; and connect before building_from_patterns node; Check if the field can read this. Quote Link to comment Share on other sites More sharing options...
Dag Posted March 7, 2023 Author Share Posted March 7, 2023 (edited) no it does not see this attribute, when I dive inside the first null on the pattern slot see this attribute but not the node itself. Edited March 7, 2023 by Dag Quote Link to comment Share on other sites More sharing options...
fencer Posted March 7, 2023 Share Posted March 7, 2023 15 minutes ago, Dag said: no it does not see this attribute, when I dive inside the first null on the pattern slot see this attribute but not the node itself. Check hip Pattern_with_attribute_v01.hip Quote Link to comment Share on other sites More sharing options...
Dag Posted March 7, 2023 Author Share Posted March 7, 2023 Great THANK YOU!!!! Yes it works! 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.