Jump to content

Help needed regarding points


surajshenoy91

Recommended Posts

I have a AutoCAD plan with roughly 1000 points . I want to display a sl. number along side the respective points and then generate A excel file with point number and their co ordinates. I am very new to AutoCAD. Can anyone give me detailed procedure how to do this?? Thanks in advance

Link to comment
Share on other sites

I noticed many times discussions on this matter, so a search on the Forum for "points numbering" should give you plenty of options; an AutoLISP routine that will give you the expecting result may be later easily adapted to export in CSV (for Excel) format.

May want also to take a look to the tools Lee Mac is kindly offering.

Link to comment
Share on other sites

Give this a go expects a text style of pick pt, default ht =0 not preset

 

(defun pt2txt ( / ss x y z lineans)
(setq ss (ssget "x"  (list (cons 0 "Point"))))
(setq fout (open "C:/temp/pt2txt.csv" "w"))
(setq I 0)
(repeat (sslength ss)
(setq pt (assoc 10 (entget (ssname ss I))))
(setq x (nth 1 pt))
(setq y (nth 2 pt))
(setq z (nth 3 pt))
(setq lineans (strcat (rtos (+ I 1) 2 0) "," (rtos x 2 3) "," (rtos y 2 3) "," (rtos z 2 3)))
(princ lineans)
(command "text" (list x y z ) 2.5 0 lineans ) ;pt x y z 
;(command "text" (list x y z ) 2.5 0 (rtos I 2 0) ) ; pt numb only
(write-line lineans fout)
(setq I (+ I 1))
) ; repeat
(close fout)
(princ)
)
(pt2txt)

Link to comment
Share on other sites

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...