fbby Posted June 17, 2009 Author Posted June 17, 2009 Thank you sir its worked but there is a problem, the coordinates are separated by 1 tab not 1 space (sorry), because it is not working on 1 tab, can you help me about this? thanks _________________________ sorry for my english Quote
Lee Mac Posted June 17, 2009 Posted June 17, 2009 This should work with TAB: (defun c:ptpoly (/ doc spc file nl ptlst) (vl-load-com) (setq doc (vla-get-ActiveDocument (vlax-get-Acad-Object)) spc (if (zerop (vla-get-activespace doc)) (if (= (vla-get-mspace doc) :vlax-true) (vla-get-modelspace doc) (vla-get-paperspace doc)) (vla-get-modelspace doc))) (if (setq file (getfiled "Select File" "" "txt" ) (progn (setq file (open file "r")) (while (setq nl (read-line file)) (setq ptlst (cons (StrBrk nl 9) ptlst))) (close file) (if ptlst (progn (setq ptlst (apply 'append (mapcar (function (lambda (x) (list (car x) (cadr x)))) (reverse (mapcar (function (lambda (x) (mapcar 'distof x))) ptlst))))) (vla-addLightweightpolyline spc (vlax-make-variant (vlax-safearray-fill (vlax-make-safearray vlax-vbdouble (cons 0 (1- (length ptlst)))) ptlst)))) (princ "\n<< No Points Found in File >>"))) (princ "\n<< No File Selected >>")) (princ)) (defun StrBrk (str chrc / pos lst) (while (setq pos (vl-string-position chrc str)) (setq lst (cons (substr str 1 pos) lst) str (substr str (+ pos 2)))) (reverse (cons str lst))) Quote
fbby Posted June 17, 2009 Author Posted June 17, 2009 It is really worked Thank you very much!!! :D _____________________________ sorry for my english Quote
Lee Mac Posted June 17, 2009 Posted June 17, 2009 It is really workedThank you very much!!! :D _____________________________ sorry for my english I'm glad it worked for you Quote
rkmcswain Posted June 17, 2009 Posted June 17, 2009 sorry guys if I late reply I want to connect the coordinates by polylines, This still works too. Just replace MULTIPLE and POINT with a single line: PLINE :wink: Quote
TOLAACC Posted December 21, 2010 Posted December 21, 2010 Could you show me with detail information, i try to use with scrip file but not success. Quote
ReMark Posted December 21, 2010 Posted December 21, 2010 Could you show me with detail information, i try to use with scrip file but not success. See post #7 by rkmcswain. Quote
Bhanson Posted December 22, 2010 Posted December 22, 2010 Try using this website it includes a free add-in for MS Excel that I use almost daily. It's really easy if you follow the instructions on the site and understand how the command line works. http://www.scriptsheets.com/ Quote
swaroop Posted December 25, 2010 Posted December 25, 2010 if u wana mark points of the coordinates with elevation text & remarks then ther is a soft ware named data link if u download it u will be able to do so in some seconds if any dout msg me at swaroopmalyala@hotmail.com sorry for my english Quote
ReMark Posted December 25, 2010 Posted December 25, 2010 Have you used this program called DataLink? Quote
The Buzzard Posted December 26, 2010 Posted December 26, 2010 Ok swaroop, I took another look and what I think you are referring to is the built-in data link manager in AutoCAD itself. There is no special software required. I do not think this is a very easy way to go as far as what the other person is looking to do. This is a bit more involved. The other person is looking for a program to accomplish this. Here is what I found on the subject. Autodesk tip: http://usa.autodesk.com/adsk/servlet/ps/dl/item?linkID=9240615&id=11752914&siteID=123112 Here is a link on the subject from The CAD Geek: http://thecadgeek.com/blog/2007/04/linking-excel-and-autocad-with-data-links/ From AutoCAD Help file: Quote
Recommended Posts
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.