Obligatory “New to Dynamo, spent days searching, admitting defeat and asking for help” intro.
End goal: Create a list of points along the bottom centerline of a ductwork, with start/end/every 10’ intervals. Have a name/ID that matches points to duct section. Load points into Total Station for layout.
What I’ve done: I can create a Dynamo Geometry Line using the start/end point of the duct, shifting down to the bottom of the duct, and a curve.PointsAtChhorchLengthFromPoint of 10’. The initial list (using list.create) does not include the end point. If I hit the + sign and connect the curve.endpoint, it creates a sublist of those points instead of adding the end point to the end of each line. Aka, it’s not grouped by line.
Solution I can think of but can’t do: If the line had an ID attached to it, I could flatten the points and then organize by the ID name. That also organizes my data for me. But I don’t see any name or ID for a Geometry Line created in Dynamo. Is there some way to assign a name to a Geometry Line (or find a name that was automatically assigned)? Here’s a screenshot of the list:
There’s a secondary problem that is the excel output isn’t in a table, which might impact the solution of this, but so far that’s been a problem for another day.
Sure. It’s a bit long. I’ll do a wide shot that will probably not be legible and then do a zoomed in on the section I think will be more relevant.
I believe I figured out how to insert the endpoint to the list, which is good, but I’m still needing to find a way to organize the list by some sort of naming scheme that I can match to my plans in Revit. And preferably output the X/Y/Z to excel as columns with the name associated with it.
It sounds like you’re using List.Create to join your starting points and end points but it will do exactly that - join the two lists into a new list. What you actually want is to add the end points to the starting points sublists. You can do that with List.AddItemToEnd and some list levels.
You may need to expand on this. You know the duct element that the points came from and their order, is that enough to Id them? How does this relate back to the Revit model?
There’s no direct way to name geometry but there are workarounds. The first is to just let Dynamo manage those relationships through list structure. Again, do you need a name if you already have the points mapped back to a duct element? You can always use a dictionary to relate a name to a piece of geometry, but that only helps when you have some other way of identifying names.
List Levels. That’s what I was missing. Thank you so much.
You’re right - I don’t think I actually need a name for the geometry. The 0, 1, 2 list order would do well enough. Ultimately my electricians will have a tablet with the points overlaid over the plans, and they will be able to select a point by tapping on it, so a name wouldn’t really matter.
One last question (and again my thanks for your help). The Excel or CSV output. I need each point to be a row and X,Y,Z to be a separate column. If I’m reading the Data.ExportToExcel help info right, I need each point to be a list with the X, Y, and Z being a separate line. In the screenshots, the white square with a number in it for each item in a list would need to be it’s own list, with the X/Y/Z being a white square with a number in it beneath it. That right?
Any good way to modify the list to be that? I’ve tried to explode it, transpose it, separating the points into X, Y, and Z, and do a negative level (which sadly doesn’t exist).
Edit: Well, I might have figured it out, but it seems overly complicated. I’m assuming there is a better way to do this, but here’s what I got.
First thing is you can only have a L3 list. That means you need to flatten your points and then get the X, Y, and Z components. If you want to keep the points separate you’ll need to add lines, headers, etc. to your table to show that.
In case somebody sees this and wants the script, here is what I ended up with. There’s two input categories - one if you want to select individual ducts and one that selects all ducts. This gives you points along the bottom of the duct, centered, at the start and end and every 10’ between. You’ll want to choose the file location for export (and maybe switch to a CSV output if that’s what your total station wants). Duct Locations for Total Station.dyn (67.1 KB)