4o4osan Posted October 24, 2014 Share Posted October 24, 2014 Hi everybody, Many times in my practice we receive a 3d design from an external design company in different formats. The most common one is the XML format, but that one is not always giving the best result. I talking about designs with many different layers, slopes... The result surface from the import of XML file is basically only points and Civil is deciding how to make the triangulation. That is why we ask for DAT file. Most of the times it is an export option in the microstation or 3Dmax I am not sure about. That file is consisted by points and lines defined with E, N, Z and an extra forth column with the numbers 1 or 0. I think that is an old format also used for plotters - 1 is pen down, 0 is pen up. I have lisp which can import that coordinates as a 3D plyline, but then is a real challenge to filter the break lines from the points. I have some experience with lisp and I tried to write one by my self, but I am sucked at the moment where the line number from the file should be saved, line or 3dpoly command executed and then continue from the last used line till the end of the file. Any routine which will read and import the points and lines correctly will help me a lot. If anybody finds that a challenging and interesting I will highly appreciate any ideas and suggestions . One example of that .dat file, saved as simple txt is attached. Berm A.txt Quote Link to comment Share on other sites More sharing options...
BIGAL Posted October 24, 2014 Share Posted October 24, 2014 4th colum I think its more start line if its 1 start a new line. So pt pt then a "" then a new LINE something like this as a script righthand side note the blank lines are required 594132.39 6708102.10 -323.16 1 "LINE" 594132.39,6708102.10,-323.16 594132.40 6708102.10 -323.05 0 594132.40,6708102.10,-323.05 594132.39 6708101.48 -323.19 1 "line" 594132.39,6708101.48,-323.19 594132.40 6708101.48 -323.09 0 594132.40,6708101.48,-323.09 594132.39 6708101.39 -323.20 1 line 594132.39,6708101.39,-323.20 594132.40 6708101.39 -323.09 0 594132.40,6708101.39,-323.09 594119.49 6708102.79 -322.86 0 594119.49,6708102.79,-322.86 594120.60 6708102.89 -322.72 0 594120.60,6708102.89,-322.72 594121.49 6708102.96 -322.62 0 and so on Quote Link to comment Share on other sites More sharing options...
steven-g Posted October 24, 2014 Share Posted October 24, 2014 Taking BIGAL's point that "1" equals the start of a new line, I came up with this, I might be way off base and I don't really know anything about survey data (northings and eastings ?) but hopefully it is a starting point. I copied the text file into excel and used the text to columns from the data tab, using "spaces" as a delimeter to get the data into columns, I inserted a blank line at the top and added the word "line" into cell G1 then a simple formula to G2 and copied down to the end of the data. Then selected the whole of column G copied (Ctrl+c) and pasted (Ctrl+v) that into the autocad command line (the command line has to be active - you can't just paste into the autocad window. Attached is the resulting DWG and the Excel file with the formula. I hope the results are something like reality (it does just use the line command) On the second sheet of the Excel file there is a formula that uses 3Dpoly, but that doesn't look quite right? it might need the data order changing, possibly a built in check to only use 3Dpoly when there are multiple lines (multiple zero). A copy of an actual dwg with the correct data layout would help. EDIT actually 2 Excel files due to a size limit Survey.dwg line.xlsx 3Dpoly.xlsx Quote Link to comment Share on other sites More sharing options...
BIGAL Posted October 24, 2014 Share Posted October 24, 2014 Nice 1 Steven excel is good for this stuff. Yeah draw all as 3dpoly Quote Link to comment Share on other sites More sharing options...
4o4osan Posted October 25, 2014 Author Share Posted October 25, 2014 Tanks for the replays guys. With some small adjustments the excel file is doing what I wanted. That way works, but it is still quite slow. Sometimes we need to import 20 of those designs. I will try to base continue with my lisp based on that output. Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.