Python: Retrieve MM file headers
Rupert (Moderator (AUS)) 10 years ago in Scripting • updated by anonymous 10 years ago • 4
I would like python to return all the field names of a MM file.
The ‘get_str_field_value’ does not appear to work for record_id = 0. Can anyone
tell me how to extract data from the header row of MM files?
Customer support service by UserEcho
I am very new to Python scripting but I would record a script in Micromine that used the file : modify option to open the header of the Micromine file you want to modify and then select the data you want from there.
Thanks for the suggestion Keith. Unfortunately recording a script when modifying a file just seems to record that a command was run "MMpy.Command("#36000").run()" without giving any details of the file headers.
Good to hear that some additional functions are on the way Yan. I found a fix which is to export the file as txt or csv (with headers) and then work with that. It slows things down but it will do until SP1 arrives.
When SP1 is released, you could use this script: Print_a_Micromine_File_Header.py