View Full Version : Coordinates
matt41129
25th Oct 2007, 06:51 pm
Im working on a big project, is there anyway to automate a coordinate listing into a table. I have houses i need to get foundation coordinates on. I already done this the hard way of picking off coordinates and makeing my own table. (which sucks) but there has to be someway maybe with a lisp that you can pick points and tabulate them? I have AutoCAD 2004 It might not be possible with the basic version. Im sure SurvCAD or something might have that feature.. Any ideas?
CADken
25th Oct 2007, 07:17 pm
have you tried searching the forum?
http://cadtutor.net/forum/search.php?searchid=176901
Excel to CAD?
fuccaro
25th Oct 2007, 07:26 pm
try this:
(defun c:pore();POint REcorder
(setq file (open (getfiled "Output file" (substr (setq n (getvar "DWGNAME")) 1 (- (strlen n) 4)) "TXT" 1) "w"))
(setq p (getpoint))
(while p
(setq s (apply 'strcat (mapcar 'strcat (mapcar 'rtos p) '("," "," ","))))
(write-line s file)
(setq p (getpoint))
)
(close file)
)
matt41129
25th Oct 2007, 07:31 pm
Nope i sure didnt try to search the forums... Sorry, i guess you guys get asked the same questions alot....
matt41129
25th Oct 2007, 07:35 pm
try this:
(defun c:pore();POint REcorder
(setq file (open (getfiled "Output file" (substr (setq n (getvar "DWGNAME")) 1 (- (strlen n) 4)) "TXT" 1) "w"))
(setq p (getpoint))
(while p
(setq s (apply 'strcat (mapcar 'strcat (mapcar 'rtos p) '("," "," ","))))
(write-line s file)
(setq p (getpoint))
)
(close file)
)
Thanks for the quick response.... i get a error... mallformed list on input.. im a beginner does this mean that i have to give it a path to save the list??
CarlB
25th Oct 2007, 07:55 pm
Try this revision to fuccaro's routine - it was missing a closing parenthesis-
(defun c:pore();POint REcorder
(setq file (open (getfiled "Output file" (substr (setq n (getvar "DWGNAME")) 1 (- (strlen n) 4)) "TXT" 1) "w"))
(setq p (getpoint "\nSelect Point: "))
(while p
(setq s (apply 'strcat (mapcar 'strcat (mapcar 'rtos p) '("," "," ""))))
(write-line s file)
(setq p (getpoint "\nSelect Point: "))
)
(close file)
(princ)
)
fuccaro
25th Oct 2007, 08:16 pm
Thank you CarlB!
Matt41129 sorry for the inconvenience.
Strix
26th Oct 2007, 01:01 am
have we already got a FAQ for this or do I need to bookmark it?
Powered by vBulletin™ Version 4.1.2 Copyright © 2012 vBulletin Solutions, Inc. All rights reserved.