Point.ByCoord from list

I have this list which I’ve divided to use as xyz-coordinates. Only problem is that it won’t work! :slight_smile: Could it be the high coordinate numbers? Float/Integer/string error?

Capture

pls attach a bigger pic or dynfile.

cannot read nothing

It seems as everytime I upload a picture it resizes it to 300x400 or something…

it is a flattened list which repeats like this:

0 (point name)
6000000.654 (X-coord in float)
600000.654 (Y-coord in float)
0.000 (Z-value in float)

etc.

then I use List.TakeEveryNthItem on each of the values and try to put them in a point.bycoordinates node.

try editing the link to the image so that it goes to the actual upload of the whole image… I’m guessing your lists are not the same length perhaps so one of the point operations fails, hard to tell though, I doubt it’s the coordinate values.

Try making one point at those coordinate to test it though.

I cant figure out the upload tools as far as picture size goes…

But here is a link: http://imgur.com/X1KcaBi

The lists are equally long, and the testing a single value of the same size works apparently. The zoom extend doesn’t fit to the single point properly though

Can you upload your dyn file please

stikningsdata

JBO_excelcoordtotopo

I think it has something to do with the numbers coming from excel. I managed to get it working by editing each list to float with a pythonscript I wrote:

Python script to convert list items to float.

Boiler-plate import statments included out-of-the-box

import clr
clr.AddReference(‘ProtoGeometry’)
from Autodesk.DesignScript.Geometry import *

The inputs to this node will be stored as a list in the IN variable.

nums = IN[0] # List of numbers edit

fl = [] # Empty array to contain resulting floats

Loop through each item and make float .

for i in range(len(nums)):
result = float(nums[i])
fl.append(result)

Assign the output to the OUT variable

OUT = fl

 

 

Here is the new dyn file as well. A bit smaller and concise than the first one

JBO_excelcoordtotopo