Visual LISP, AutoLISP and General Customization
cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

Calculating Depth Ranges for Sanitary Sewer

9 REPLIES 9
Reply
Message 1 of 10
JCanaan
950 Views, 9 Replies

Calculating Depth Ranges for Sanitary Sewer

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

9 REPLIES 9
Message 2 of 10
stevor
in reply to: JCanaan

Start by posting that lsp routine, as an attachment if longer than a few lines.
S
Message 3 of 10
JCanaan
in reply to: stevor

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.

Message 4 of 10
JCanaan
in reply to: JCanaan

actual lisp

Message 5 of 10
CADaSchtroumpf
in reply to: JCanaan

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

Message 6 of 10
JCanaan
in reply to: CADaSchtroumpf

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.

Message 7 of 10
CADaSchtroumpf
in reply to: JCanaan

I don't understand very well the philosophie of this code, but i hope that is good!

Message 8 of 10
JCanaan
in reply to: CADaSchtroumpf

Still blows up. I guess I will keep working on it when I have time. Thanks.

Message 9 of 10
~Opie
in reply to: JCanaan

Do you have a sample drawing of the Civil 3D entities? Or even one that shows similar to your initial description?
Message 10 of 10
JCanaan
in reply to: ~Opie

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.

Can't find what you're looking for? Ask the community or share your knowledge.

Post to forums  

Autodesk Design & Make Report

”Boost