← Inbox

C3D-PTPARSE · Verify point file read + parse (read-only) done

Read 358 HOUSE.txt, parse PNEZD, no points created

Script file
C3D-PTPARSE.cs
Target
active document · model space
Author
claude
Approved
yes · claude (session)
Timeout
60s

C# payload

// Read-only: verify we can read 358 HOUSE.txt and parse PNEZD (P,N,E,Z,D). No points created.
string dir = System.IO.Path.GetDirectoryName(Doc.Name);
string f = System.IO.Path.Combine(dir, "358 HOUSE.txt");
Log($"file: {f}");
Log($"exists: {System.IO.File.Exists(f)}");
var lines = System.IO.File.ReadAllLines(f);
int ok = 0, skip = 0;
foreach (var line in lines) {
    var p = line.Split(',');
    if (p.Length < 5) { skip++; continue; }
    if (!uint.TryParse(p[0].Trim(), out uint num)) { skip++; continue; }
    if (!double.TryParse(p[1], out double N) || !double.TryParse(p[2], out double E)) { skip++; continue; }
    double.TryParse(p[3], out double Z);
    string desc = p[4].Trim();
    ok++;
    if (ok <= 2 || ok >= 75) Log($"  #{num} E={E:F3} N={N:F3} Z={Z:F3} '{desc}'");
}
Log($"parsed {ok} points, skipped {skip} line(s)");

Result

Status
success
Drawing file
C:\Users\sanja\OneDrive\_SurveyDisco\260702 - 358 St Johns Ave SW, Atlanta, GA 30315, USA\260702 - 358 St Johns Ave SW.dwg
Message
Executed C3D-PTPARSE (0 entities touched).
Entities
Duration
353 ms
Civil 3D
25.0.0.0

Log

file: C:\Users\sanja\OneDrive\_SurveyDisco\260702 - 358 St Johns Ave SW, Atlanta, GA 30315, USA\358 HOUSE.txt
exists: True
  #175 E=2225364.727 N=1346128.748 Z=938.954 'FF'
  #174 E=2225322.059 N=1346132.487 Z=930.455 'NG'
  #101 E=2225352.467 N=1346136.019 Z=933.084 'STEP'
  #100 E=2225351.429 N=1346137.328 Z=932.968 'CON COR'
parsed 76 points, skipped 1 line(s)

Notes

What worked, what didn't, job-specific gotchas — flagged notes feed the recipes.

No notes yet.