HELP! - Need script that exports Vertex X,Y coordinates to textfile....
Hello. I desperately need a script that can export vertex points X,Y coordinates to a textfile like .csv. Like the following...
1. Select a set of vertex points.
2. Run script.
3. Browse for a textfile output and name it.
4. A .csv file (or any textfile) is created with two columns X and Y for each vertex coordinate in relation to grid 0, 0 position in model.
Could someone help me with this script?
Thank you.
Comments
Lol!! I had responded and
Lol!! I had responded and created the script in AREA the 05-12-2015...by a look...
http://forums.autodesk.com/t5/programming/help-need-script-that-exports-...
Hello again. I checked script
Hello again. I checked script now and it exports coordinates good. But the order of the exported x,y is not correct. Please check....
Script now........
3364.05 9382.2
9204.08 5014.29
8545.49 5190.76
7927.55 5478.91
7309.62 5767.06
6691.68 6055.21
6101.21 6396.12
5578.91 6834.38
5056.6 7272.65
4534.3 7710.91
4096.04 8233.21
3704.96 8791.73
Correct.............
3364.05 9382.2
3704.96 8791.73
4096.04 8233.21
4534.3 7710.91
5056.6 7272.65
5578.91 6834.38
6101.21 6396.12
6691.68 6055.21
7309.62 5767.06
7927.55 5478.91
8545.49 5190.76
9204.08 5014.29
It seems the script put the last coordinate first and then the order is reversed. This is important to change for the use I need the script for.
Would it be possible to adjust the script? Thank you.
`
only way i see is just to sort positions before save.
I'm not sure if script can get points in the right order you need, but definitely can sort it before it saves to file.
I'll post new one later today.
`
ok, try this one:
I tried with one vertex...
I tried with one vertex... script gives me....
8060.24 -7757.49 (millimeters?)
Objects properties in 3ds max gives me....
X: 402.745 cm, Y: 429.476 cm
I can't seem to relate these two?
`
what kind of vertex points ? from mesh, edit poly or spline ?
Editable poly it is...
I'm new to 3ds max but when I select the object, its a UV layer with texture.. it say in a box editable poly. When I select a vertex point it say the same.
`
ha, so i guessed right and did this in free time...
here is a code:
just change csvFile path and separator symbol, here I did space symbol " "
It works only for 1 selected object, if you want select more it need a for loop for each object
Hope it helps a bit,
Pixamoon
Thanks very very much... but
Thanks very very much... but what do you mean one selected object? I have a plane as editable poly and some of the vertex points in this plane I need to select, and then export coordinates.
I will try the script.. thanks
Hello. I ran the script and
Hello. I ran the script and it created a .csv. The content looked like this....
-6175.0 0.0
-506.207 9097.78
-506.207 7975.06
-408.355 6856.6
-506.207 5738.15
-890.202 4683.13
-1451.57 3710.82
-2012.93 2738.51
-2574.29 1766.2
-3135.66 793.887
-3929.55 7.23748e-005
-5052.27 0.0
But when I checked the "object properties" of the first vertex closest to 0, 0, I get the X and Y coordinates: X: 576,665 cm, Y: 909,778 cm.
this does not seem to match the csv file output. What can be wrong?
Ones again.. thanks for your help.