How to create lines using Excel data as coordinates

Hi there,

Today is my second day working with Dynamo. I’m trying to create lines using basic information from Excel as coordinates, but not quite sure I’m using the right nodes? Also, I created the nodes File path/Read from path/Excel from file, but they don’t seem to read the information from Excel as not information is shown in the nodes. Can anyone tell me what am I doing wrong?

Thanks in advance

image

Can you show what your Excel data looks like? Attach a Watch node to the ReadFromFile output.

Thanks Nick,

This is the Excel file (just very basic information to create these lines)

image

This will get you your points.


But how do you want your points/lines connected? Are you just connecting points consecutively? If so, you can shift the indices of the list and create the lines with the first list and the shifted list.

1 Like

I was trying to create 3 different lines using the 3 different groups of coordinates from Excel, but perhaps I should use the ‘Point by coordinates’ that you suggest? Also, would you know how can I turn on the 3D background that you have in the image? Mine shows blank

Ensure the backround preview is enabled. It’s under view, enable backround 3D preview. Next check that your geometry is in a workable range (i.e.: you are drawing points lightyears apart).

There is additional discussion on other issues here as well if those don’t work:

Hi Jacob,

Thanks for your response. I have already enabled the background preview and double checked all options from the view tab are correct. I also checked earlier today the discussion you mention in the comment but unfortunately didn’t help me much. I’m starting to think that it might has something to do with Windows 10?

Yeah, it can be the OS, graphic card(s), Dynamo version… there are a lot of reasons actually. Do you have a preview in Revit? What about with VERY simple geometry, say a line from 0,0 to 10,10?

Correct, that is exactly the type of geometry I’m working with (very simple stuff as I’m completely new to the Software). I just tried with a different computer that runs an older version of Windows and I can see the background preview. I can’t see the Revit preview and the Watch 3D option doesn’t work either unfortunately. I’ve got DirectX 12, Windows 10, Revit 2017.2 with the according built-in Dynamo version installed in my laptop. Maybe one of these programs is causing this?

Graphics cards?

Your excel data isn’t in the best structure for pulling the information you want but it’s still very doable.

@jacob.small that’s exactly right. It is an issue with my graphic card which is not being identified by my two external screens so that the 3D preview background is not showing. However, when I work only with my laptop I can perfectly see it. Therefore no issues between Dynamo’s version and Windows 10.

@Nick_Boyts Thanks for this. I reproduced your screen in my laptop and I can see the 3 lines showing with a couple of null errors. Would you know how could I get rid of the null values?

Thanks a lot to both of you for your help!

Place a list.clean node with a false ‘maintain list index’ input after the read excel node.

Someone typed something outside the functional range at some point. This can be cleaned up by deleting rows/columns as needed.

Thanks! That reduced the items of my list considerably, however it gave some some new errors in the List.GetItemAtIndex, but I will work it out though.

Thanks again for your time and help!