Grasshopper

algorithmic modeling for Rhino

Hello everyone, 

I would like to shift a list of GUID objects (lines).

I used the following function: self.line2.append( self.line2.pop(0) )

But it doesn't work, and this message is appearing:

"Message: 'Guid' object has no attribute 'append'"

You can have a look at my script, attached.

Line 34 is the problem. If you comment it, the script is working.

Thank you for your help,

Paul

Views: 1048

Replies to This Discussion

Hi,

line2 is not a list, is a GUID thus the non existing append method. You should perform your shifting in the final list of curves whatever or wherever that is.

Also just a note, this forum is intended for Grasshopper related questions only. i mean your questions will be answered eventually but for ironpython there is place specifically for that.

Best,

M.

pList = [] 
linelist = []
for t in range(time):
pList.append(w.point())
w.step()
linelist.append(w.lines())
pList.append(w.divLines()) 
pList.append(w.linkPts())
#print w.x
M.

something is wrong and i cannot edit my previous answer,

So create an empty list lets say linelist. Append all the lines coming out of your class there. and then shift them as you like using your previous code.

What are you saying Marios, everyone knows if you want a fast accurate answer to anything you come here!

Grasshopper

Rhino

Python

Excell

Windows

What sort of Washing Powder I should use to get whiter than white results

The list goes on

:D

Mmmm, in that sense you are probably right Danny.

And I, by no means, wanted to prevent Roger from posting here, and I apologize if that came out that way. But the rhino.python forum is also pretty amazing and Roger would benefit from that.

As far as the washing powder is concerned, I may be starting a new thread for this at the FAQ..

:) 

RSS

About

Translate

Search

Photos

  • Add Photos
  • View All

Videos

  • Add Videos
  • View All

© 2024   Created by Scott Davidson.   Powered by

Badges  |  Report an Issue  |  Terms of Service