Jump to content

cross section lisp


Guest

Recommended Posts

Hi i need help to finish a cross section lisp. This lisp use *.txt file for the ground

(example ground1 and ground 2) and draw the cross section for eatch ground. I need help to draw the table with groun elevetion and distance.

 

I want to ask me

 

1)select ground 1 / or ground and the draw the table (I need to have the option to change the datum elevetion)

 

The lisp code is

 

(Defun c:test ()
(progn
   (initget "1 2")
   (setq
     l
      (cond
	((getkword
	   "\nFor Ground1 (1)/ For Ground (2) < 1 > :"
	 )
	)
	("1")
      )
   )

(if (eq l "1")
(COMMAND "_layer" "_m" "Ground1" "_c" "94" "" "")
      )
      (if (eq l "2")
(COMMAND "_layer" "_m" "Ground2" "_c" "10" "" "")
   )
)
(setq FH (getfiled "Select File  L,H (*.txt)" "" "txt" 16))
(setq fil (open FH "r"))
(command "_.pline"); start Polyline
(while (setq lin (read-line fil)) (command lin)); feed in coordinates
(command ""); end Polyline
(command "zoom" "e")
(close fil)
);End Defun

 

Thanks

ground1.txt

ground2.txt

Link to comment
Share on other sites

  • 2 years later...

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.

Guest
Unfortunately, your content contains terms that we do not allow. Please edit your content to remove the highlighted words below.
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...