Jump to content

Recommended Posts

Posted

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

  • Replies 30
  • Created
  • Last Reply

Top Posters In This Topic

  • fbby

    7

  • Lee Mac

    7

  • wannabe

    6

  • ReMark

    4

Top Posters In This Topic

Posted Images

Posted

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

Posted

It is really worked

Thank you very much!!! :D:D

 

 

 

 

_____________________________

sorry for my english

Posted
It is really worked

Thank you very much!!! :D:D

 

 

 

 

_____________________________

sorry for my english

 

 

I'm glad it worked for you :D

Posted
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:

  • 1 year later...
Posted

Could you show me with detail information, i try to use with scrip file but not success.

Posted
Could you show me with detail information, i try to use with scrip file but not success.

 

See post #7 by rkmcswain.

Posted

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/

Posted

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

Posted

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:

Document1.jpg

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