Laura Stone Posted June 30, 2023 Share Posted June 30, 2023 I think this will largely be sorted out with the forthcoming hedgerow styles but has anyone found a good way of labelling hedgerows with data tags? Currently I've had to do a workaround by putting each hedgerow type into a class named for its description and then putting #C# in after the number of plants. Ideally with styles I'd like to have something like: 50 No Mixed hedge: 20 Ilex aquifolium 20 Carpinus betulus 10 Corylus avellana Would also be nice to be able to specify single or double rows. Another request would be the ability to modify the external shape without affecting the umbers, e.g. when a hedge has a chamfered end, or in a recent case an existing hedge that had a gateway cut into it. Laura Stone Quote Link to comment
Tom W. Posted June 30, 2023 Share Posted June 30, 2023 I was hoping this might do it: But it doesn't do the maths unfortunately: But perhaps @Pat Stanford or @Nikolay Zhelyazkov can say how it should be done! This is the Hedgerow settings: Quote Link to comment
Pat Stanford Posted June 30, 2023 Share Posted June 30, 2023 @Tom W. Can you post your test file please so I don't have to try and recreate it which I almost always get wrong. My guess is that the SymProp fields are defined as Text instead of number and will need a VALUE function to convert them to a number so the math works. 1 Quote Link to comment
Tom W. Posted June 30, 2023 Share Posted June 30, 2023 Sure thank you: Hedgerow Tag Test.vwx It's funny: in the process of copying the tag + hedgerow into a clean blank file the /100 part of the formula has stopped working. Why does it work in one file but not in the other...? Be glad to hear your thoughts thanks for looking at it Quote Link to comment
Pat Stanford Posted June 30, 2023 Share Posted June 30, 2023 It turns out that it is 'Hedgerow'.'Total Plants' that is defined as text. Here is the Data Tag code to return the values two different ways. The first three lines are your basic formula but using the WS_Value to convert the 'Total Plants' to a number. The second three lines are using the "hidden" fields in the record that already store the numbers that you want. But be careful as those fields are defined as a REAL number which means there is a possibility you could end up with a value of 4.3 plants or something. But I think that could be a possibility with the first formulas also. #Hedgerow#.#SymbName1#: #Hedgerow#.#SymbProp1#/100*#WS_VALUE('Hedgerow'.'Total Plants')# #Hedgerow#.#SymbName2#: #Hedgerow#.#SymbProp2#/100*#WS_VALUE('Hedgerow'.'Total Plants')# #Hedgerow#.#SymbName3#: #Hedgerow#.#SymbProp3#/100*#WS_VALUE('Hedgerow'.'Total Plants')# #Hedgerow#.#SymbName1#: #Hedgerow#.#__SymbQuant1# #Hedgerow#.#SymbName2#: #Hedgerow#.#__SymbQuant2# #Hedgerow#.#SymbName3#: #Hedgerow#.#__SymbQuant3# 1 Quote Link to comment
Tom W. Posted June 30, 2023 Share Posted June 30, 2023 Brilliant thank you. 4 minutes ago, Pat Stanford said: The second three lines are using the "hidden" fields in the record that already store the numbers that you want. So did you find these by searching for them somewhere or was it just trial + error + years of experience, sixth sense, etc?! Can I have your brain when you retire? 🙂 Quote Link to comment
Pat Stanford Posted June 30, 2023 Share Posted June 30, 2023 I'm a little surprised you don't already know about my magic PIO field script. It creates a worksheet that shows the display name, the Record.Field values, and the field type for the parameter record of a PIO on a layer (does not work on object in walls or in groups). I think this link is to the last version, but you might want to scan the entire thread. Some others made some additions (made it a menu command instead of a script. Very handy for issues like this. 2 Quote Link to comment
Tom W. Posted June 30, 2023 Share Posted June 30, 2023 Thank you yes I do have a vague recollection about seeing this but I think it all sounded very complicated at the time so I scurried away + didn't investigate further... But now I've seen it in action I reverse my position! I will play around with it thanks for the link. BTW both tags seem to be returning whole numbers whatever size I make the hedgerow. I noticed at the beginning that #Hedgerow#.#Total Plants# was always returning a whole number: so if my Hedgerow has an area of 38.621 sq m + the plant density is set to 1 plant per sq m, it returns a total plant value of 39 rather than 38.621. Is this a function of it being defined as text? And is this characteristic retained when you apply the Value function? Or does Value convert Text to Integers by default? And why if you say that #Hedgerow#.#__SymbQuant1# is defined as a Real does it not return 15.4484 plants for example instead of 15 plants...? Sorry for all the questions + thanks for taking the time to talk me through all this. Also, I hope the tag is of some use to @Laura Stone! Quote Link to comment
Laura Stone Posted June 30, 2023 Author Share Posted June 30, 2023 Thanks very much! I shall have a play around with it on Monday when my brain is less fried from moving data tags around a drawing all day. I think I did initially have the first version you posted Tom W, but fortunately noticed that the numbers were equal when they shouldn't be. Laura Quote Link to comment
Pat Stanford Posted June 30, 2023 Share Posted June 30, 2023 48 minutes ago, Tom W. said: BTW both tags seem to be returning whole numbers whatever size I make the hedgerow. I noticed at the beginning that #Hedgerow#.#Total Plants# was always returning a whole number: so if my Hedgerow has an area of 38.621 sq m + the plant density is set to 1 plant per sq m, it returns a total plant value of 39 rather than 38.621. Is this a function of it being defined as text? And is this characteristic retained when you apply the Value function? Or does Value convert Text to Integers by default? And why if you say that #Hedgerow#.#__SymbQuant1# is defined as a Real does it not return 15.4484 plants for example instead of 15 plants...? I have no idea what is going on inside the PIO, but it appears that it is rounding. The Value command should be returning a string that could represent a non-integer value. It definitely does not offer any rounding ability. Quote Link to comment
Vectorworks, Inc Employee Katarina Ollikainen Posted July 1, 2023 Vectorworks, Inc Employee Share Posted July 1, 2023 @Tom W. Yes, the Hedgerow object is rounding numbers, as you can only place 'full' plants (the same behaviour as the Landscape area has). Also note that the calculation works 'as a Landscape area' if you're using 'Area' and as a Hedgerow if you're specifying per 'linear unit' (which is the standard way to specify hedgerow). Today there is no setting for staggered vs double rows - however, it's on the horizon and will be part of a future update of the Hedgerow tool. The same with the ability to edit the perimeter of the hedgerow without changing the quantities (if you're using plants pe linear unit). Quote Link to comment
Tom W. Posted July 1, 2023 Share Posted July 1, 2023 2 hours ago, Katarina Ollikainen said: @Tom W. Yes, the Hedgerow object is rounding numbers, as you can only place 'full' plants (the same behaviour as the Landscape area has). Also note that the calculation works 'as a Landscape area' if you're using 'Area' and as a Hedgerow if you're specifying per 'linear unit' (which is the standard way to specify hedgerow). Today there is no setting for staggered vs double rows - however, it's on the horizon and will be part of a future update of the Hedgerow tool. The same with the ability to edit the perimeter of the hedgerow without changing the quantities (if you're using plants pe linear unit). Thanks. Out of interest is there a reason why 'Hedgerow'.'__SymbQuant1' etc isn't included in the 'Parameter Name' drop-down in the 'Define Tag Field' dialog? Isn't it quite a useful thing to be able to report on? Or is it excluded because as you say, the standard way to measure quantity is per linear unit? Thanks. Quote Link to comment
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.