Unexpected token ':'

I don’t understand why I am getting this message, unexpected token ‘:’ ???

import rhinoscriptsyntax as rs

def ScalingVector(pt1, pt2, scale):
    tmpVec = rs.VectorCreate(pt2, pt1)
    unitVec = rs.VectorUnitize(tmpVec)
    vec = VectorScale(unitVec, scale)
    
    newPt = rs.CopyObject(vec*i)
    vLine = rs.AddLine(pt1, newPt)
    
    return newPt, vLine


pt2D = []
newPt = []
lineList = []

for i in range(10):
    for j in range(10):
        pt2D.append(rddPoint(size*i, size*j,0)
        
        
for i in range(len(pt2D)):
    pt,line = ScalingVector(pt2D[i], attpt, scale)
    newPt.append(pt)
    lineList.append(line)

pt2D_out = pt2D
newPt_out = newPt
lineList_out = lineList

line 24
for i in range(len(pt2D)):

The code line before that is missing a parenthesis

1 Like

Thank you,

Michael

You’re welcome (:

I just started to use this forum for learning Rhino common and it is really amazing.

Michael

4 Likes