Gregory Posted March 7, 2013 Share Posted March 7, 2013 Hello, I'm trying to concatenate this channel: ch("linkedname") into this expression: centroid("../geo_triple04/OUT_triple04", D_X) Here's what I've tried, but haven't gotten it to work... centroid("../geo_`ch("linkedname")`/OUT_`ch("linkedname")`", D_X) centroid(strcat(""../geo_", ch("linkedname")+strcat("/OUT_", ch("linkedname")+", D_X) centroid(( ""../geo_" + "`ch("linkedname")`" + "/OUT_" + "`ch("linkedname")`""), D_X) centroid("../geo_" + `ch("linkedname")` + "/OUT_" + `ch("linkedname")`, D_X) Have to replace many pieces of geometry so this could save me hours of time. Thanks in advance! Quote Link to comment Share on other sites More sharing options...
rafaelfs Posted March 7, 2013 Share Posted March 7, 2013 (edited) Hello, I'm trying to concatenate this channel: ch("linkedname") into this expression: centroid("../geo_triple04/OUT_triple04", D_X) Here's what I've tried, but haven't gotten it to work... centroid("../geo_`ch("linkedname")`/OUT_`ch("linkedname")`", D_X) centroid(strcat(""../geo_", ch("linkedname")+strcat("/OUT_", ch("linkedname")+", D_X) centroid(( ""../geo_" + "`ch("linkedname")`" + "/OUT_" + "`ch("linkedname")`""), D_X) centroid("../geo_" + `ch("linkedname")` + "/OUT_" + `ch("linkedname")`, D_X) Have to replace many pieces of geometry so this could save me hours of time. Thanks in advance! use the strcat() hscript expression, it concatenates 2 strings... not as handy as python's sintaxe, but it works and you can nest them to get your expressions to work. centroid(strcat(strcat(strcat("../geo_", ch("linkedname")), "/OUT_"), ch("linkedname")), D_X)[/CODE]Cheers Edited March 7, 2013 by rafaelfs Quote Link to comment Share on other sites More sharing options...
Gregory Posted March 7, 2013 Author Share Posted March 7, 2013 use the strcat() hscript expression, it concatenates 2 strings... not as handy as python's sintaxe, but it works and you can nest them to get your expressions to work. centroid(strcat(strcat(strcat("../geo_", ch("linkedname")), "/OUT_"), ch("linkedname")), D_X)[/CODE]CheersPerfect Had to use chs() instead of ch() for what I needed, but it worked!Thank you! Quote Link to comment Share on other sites More sharing options...
edward Posted March 8, 2013 Share Posted March 8, 2013 I'm trying to concatenate this channel: ch("linkedname") into this expression: centroid("../geo_triple04/OUT_triple04", D_X) How about ... centroid("../geo_" + chs("linkedname") + "/OUT_" + chs("linkedname"), D_X) 2 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.