how to add verts to mesh?

I have a scene with a uvsphere and a plane. Now I want to copy some vertices from the uvsphere and add them to the mesh of the plane. My script runs without error, but it doesn´t add anything to the plane!

obj = Object.Get(“Sphere”)
me = obj.getData()
objP = Object.Get(“Plane.001”)
meP = objP.getData()
meP.verts.appen(me.verts[0])

can anybody help me?

If you’re using the NMesh module (which you do, by calling getData() without parameters), you have to update the mesh data in Blender after you change it.
Put this at the end of your script:

meP.update()

http://blender.org/documentation/240PythonDoc/NMesh.NMesh-class.html#update

BTW: I advise you to use the new Mesh module. You don’t have to update manually and it’s faster. I believe you automatically use Mesh by typing: getData(False, True)

Thanks very much for your help and your advise!

Better :

actually it is : meP.verts.extend(myvert) with the new Mesh module. But thanks for checking :wink:

Have a look at this page for examples.
http://en.wikibooks.org/wiki/Blender_3D:_Blending_Into_Python/Cookbook

If you have come up with some real;y simple example alredy that isnt alredy in the cookbook, please contribute. - Anyone can.

I have been looking through these examples before and I will look at them again, but these are my first steps in this language and I am still struggling with the basics of blender and phyton. As soon as I get more experienced I will be glad to share some code snippets in wiki.