Python Scripting for exporting geometric data

Python Scripting for exporting geometric data

Anonymous
Not applicable
632 Views
1 Reply
Message 1 of 2

Python Scripting for exporting geometric data

Anonymous
Not applicable

Hi,

I'm completely new to Python scripting. So I need your help guys. I'm using VRED Pro 2018. I would like to know if there is a way to retrieve geometric data from a VRED file or a set of VRED files; and save it to an excel file or as a note, using python scripting.

Or is there any other option to retrieve the geometric info?

Please help.

 

Thank you in advance.

0 Likes
633 Views
1 Reply
Reply (1)
Message 2 of 2

Anonymous
Not applicable

Hi,

in the API Documention there are all the VRED methods that you can use.

To retrieve geometric information from a node you have:

 

getPositions()

getNormals()

getTexCoords()

getDlistCache()

getVBO()

 

Example of use:

          print findNode("Box").getNormals()

 

Then using basic python:

f = open("FileName.txt","w") #Opens a file name fileName.txt

f.write("Hi") #Writes in the file

f.close() # Closes the opened file

 

And specifically for an excel you would need to add a module like pandas or xlwt to

C:\Program Files\Autodesk\VREDPro-10.2\lib\python\Lib

0 Likes