Good day
Many of our surveyors uses a program Modelmaker to post-process their survey info. The processed info is then written out in a .tot file format. I want to write a script allowing us to easily import this information into Civil 3D as a surface. I am still stuck in trying to get the points out.
This system uses a fixed column layout for the point data, which is followed by a list of the triangles joining the points. The format of the file is as follows.
I was able to split the input between points and triangle data, but now I want to split the point description from the point XYZ.
The problem is - not all surveyors are equally disciplined in entering a description and sometimes some lines will have a description and other won’t, so I thought it would be best to split it by the first occurrence of a number - this led me to the following post: how-to-split-a-string-containing-letters-and-numbers implementing the script gives this:
I am not very experienced in python - is there a way - to adjust the script to keep the full stops and the spaces after it found the first occurrence of a number?
Modelmaker.dyn (29.4 KB)
Modelmaker test.txt (287 Bytes)