I need to create a custom script to create Station Elevation Profile View lables, with stations and custom text (simple text strings) from an Excel table.
I don’t find any node that is able to write the custom text: is there any extension able to do it?
Anyone can help?
I am in a hurry for a Project to be delivered by the end of the year
I managed to have it working for the alignment labels, while (applying the same approach), with the ProfileViewStationElevationLabel.ByStationElevation the label is created just for the first item in the list of stations.
Any suggestion?
It’s because the Alignment.ProfileViews node is outputting a list instead of a single item. So either get the first item in that list (List.FirstItem) or set the input levels for the downstream nodes to @L2.
when I used the List.Create and typed one by one the strings, I was able to add a “line break” in the label using “\n”.
Now, when I used a new approach (parsing data from Excel), I have a list, which looks the same, but the “\n” character is not used as an escape Line Break in the label.
I also tried to tweak the string in Excel adding string quote (") and the semicolon ( ; ) at the end, but all the text is passed without interpretation to the label
Interesting.
As I said, it still looks strange to me that a list made from a text string (including the “/n” instance, unprocessed) is managed differently from a “set of items” (I don’t know the exact term…) made of strings (including the same “/n” which gets processed.
I read what you added here like “if I process the “/n” (substituting it with “himself” as string), it becomes what it is meant to be, a line break”
So, when one of the elements of the list is processed as “string item”, it behaves as it shoudl (and “\n” is a line break and not just text within an item in the list.