Hi,
I have an old lisp that used to calculate the stations and depth of sanitary sewer. It will not run in Civil 3D (even if I explode the entities). It is not getting a variable passed to it.
Sewer is paid at a price for 0 to 6 feet depth, 6 to 8 feet, 8 to 10 feet, and so forth (2 ft increments). It is using a line for the ground and line that represents the bottom of the sanitary sewer. Does anyone know how to get this information our of Civil 3D with or without an lisp. I don't have the knowlege to re-write the lisp.
Thanks
JMC
this is the original list and program that created a printed report with information. Any suggestions/help would be appreciated. I tried to find company that originally wrote it without success.
Your code use old polyline extract
Perhaps try to change the fonction:
(DEFUN GETVERTS (edata / lst) (while (= (**** 0 (setq edata (entget (entnext (**** -1 edata))))) "VERTEX") (setq lst (cons (list (car (**** 10 edata)) (cadr (**** 10 edata))) lst)) ) lst )
with
(DEFUN GETVERTS (edata / lst) (setq lst (mapcar 'cdr (vl-remove-if '(lambda (x) (/= (car x) 10)) edata))) )
and for me
(command "._PEDIT" gline "_Y" "_J" gsset "" "_X") (setq gline (entlast)) not work's
but
(command "._PEDIT" gline "_J" gsset "" "_X") (setq gline (entlast)) is OK
I made edits you suggested and this is message I get
STAKEOFF - Copy.LSP successfully loaded.
Command:
Command:
Command: STO
Sewer Line Take-Off v1.1 -- Copyright (c) 1996 Command Software & Consulting
Select each line segment at bottom of sewer:
Select objects: Specify opposite corner: 3 found
Select objects: Specify opposite corner: 3 found (1 duplicate), 5 total
Select objects: Specify opposite corner: 3 found (1 duplicate), 7 total
Select objects: Specify opposite corner: 2 found (1 duplicate), 8 total
Select objects:
Select line segment at grade:
Yes or No, please.
I am able to select line segment at grade and it begins to run but stops and above is what is printed. It creates file but it is empty.
I attached edited file.
I don't understand very well the philosophie of this code, but i hope that is good!
Still blows up. I guess I will keep working on it when I have time. Thanks.
Below is error message I get when running lisp. The remainder of profile in drawing I have attached was created in Civil 3D 2012. I exploded it so I can just have lines which is what the lisp needs. Ultimately I would not want to do this, but for now I could do it and create a drawing to just do the calculations in at the end. Any suggestions/help would be appreciated.
Command: STO
Sewer Line Take-Off v1.1 -- Copyright (c) 1996 Command Software & Consulting
Select each line segment at bottom of sewer:
Select objects: 1 found
Select objects: Specify opposite corner: 2 found (1 duplicate), 2 total
Select objects: Specify opposite corner: 1 found, 3 total
Select objects: Specify opposite corner: 3 found (1 duplicate), 5 total
Select objects: Specify opposite corner: 3 found (1 duplicate), 7 total
Select objects: Specify opposite corner: 2 found (1 duplicate), 8 total
Select objects:
Select line segment at grade:
Object does not intersect an edge.
Object does not intersect an edge.
ERROR: Sewer and grade line must start and end with the same X coordinate.