Thanks, Mitch. I was kind of shooting from the hip; I’m not that familiar with Python and assumed it’s error system was a little more sophisticated than it appears to be, Seems more in the VBS category.
Dunno, this is RhinoCommon and doesn’t have all that much to do with Python, in any case, if you ran some code in C# and didn’t supply an argument to a method that required one, what kind of error message would you get?
Your code tries to use Point3dAt method on the type MeshVertexList. Hence the error message contains the word type.
My suggested line uses the Vertices property on the mesh instance. The property gives access to the mesh vertices through in instance of type MeshVertexList. Since it is an actual object of type MeshVertexList the call to method Point3dAt works.
Perhaps I have to reinstall Rhino, the code you give does not work for me.
I have spent plenty of time trying to get it to work. As I am new to all this I was thinking I don’t understand how to apply this.
Have you tried copy/pasting exactly my script in an empty python script and run that?
On what Rhino v6 version are you? Run the Rhino command _SystemInfo and paste the entire first line of the result. I am on Rhino 6.6
This may still be the problem though In your response here:
you for instance use Rhino.Geometry.Collections.MeshVertexList as such. The ToPoint3dArray method is supposed to be used on an instance: VerticesListCoordinates = Mesh.Vertices.ToPoint3dArray().
You did something similar in your very first snippet, where you typed VertexCoordinates = Rhino.Geometry.Collections.MeshVertexList.Point3dAt(1). That is wrong, you are using the type Rhino.Geometry.Collections.MeshVertexList. As mentioned you should instead call the Point3dAt method on an instance of the type. In your case such an instance is available through Mesh.Vertices in your code.
@jesterking I tried the script exactly as you wrote it and it does not work for me
After your and Nathan’s comments I understand I should not use the whole path to the method and will write it as you both suggested from now on. Although the version I posted for the whole array does work. Trying Nathan’s recommendation on how to point to the actual Mesh vertices information and trying your script, copy pasted exactly with no changes on my part still gives the same error. I will report back when I reinstall and perhaps try on another machine.
Could this be related to IronPython somehow? I remember a while back I had installed another program which installed another verison of IronPython and then my Python scripts (in Rhino) stopped working. So I went and uninstalled IronPython and I don’t really remember if I installed another version… but then scripts got fixed and were running good in Rhino.