khoshravan Posted January 20, 2013 Posted January 20, 2013 I have used GeoBuilder's LISP routine to import points coordinates into CAD. Apparently it is done but I can't see the points. How can I make them visible? Also I expect after clicking OK, a line connecting the point, appears but nothing happens. ACAD only construct the layers. How can I make points visible? I also asked same question in the original thread of Import coordinates from a text file txt in AutoCAD 14th Sep. 2012 Quote
Tharwat Posted January 20, 2013 Posted January 20, 2013 This may work , but make sure that you have all your layers unlocked first . (defun c:PTvis (/ s i e) (if (setq s (ssget "_x" '((0 . "POINT") (60 . 1)))) (repeat (setq i (sslength s)) (setq e (entget (ssname s (setq i (1- i))))) (if (not (assoc 60 e)) (entmod (append e (list (cons 60 0)))) (entmod (subst (cons 60 0) (assoc 60 e) e)) ) ) ) (princ) ) Quote
Lee Mac Posted January 20, 2013 Posted January 20, 2013 @Tharwat, that could be shortened to: (defun c:showpoints ( / i s ) (if (setq s (ssget "_X" '((0 . "POINT") (60 . 1)))) (repeat (setq i (sslength s)) (entmod (append (entget (ssname s (setq i (1- i)))) '((60 . 0)))) ) ) (princ) ) Quote
Tharwat Posted January 20, 2013 Posted January 20, 2013 @Tharwat, that could be shortened to: Certainly , and nicely done . Quote
marko_ribar Posted January 20, 2013 Posted January 20, 2013 After this (above posted codes), you may want to check point style that is currently active... Maybe that's why you don't see points in the first place... Change PDMODE sysvar... M.R. Quote
Lee Mac Posted January 20, 2013 Posted January 20, 2013 Apparently it is done but I can't see the points. Perhaps the program failed to create the points? Quote
khoshravan Posted January 20, 2013 Author Posted January 20, 2013 @Tharwat, that could be shortened to: (defun c:showpoints ( / i s ) (if (setq s (ssget "_X" '((0 . "POINT") (60 . 1)))) (repeat (setq i (sslength s)) (entmod (append (entget (ssname s (setq i (1- i)))) '((60 . 0)))) ) ) (princ) ) Sorry if my question sounds too novice. I copied above code into wordpad and saved it with lsp and vlx extensions and named it showpoint. Inside cad, I used appload command to load above routines. in the bottom it shows that both are loaded successfully. But when I type showpoint in cad, it says unknown command. How can I use these routines? Quote
khoshravan Posted January 20, 2013 Author Posted January 20, 2013 showpoint or showpoints ? Thanks. I misses the s Quote
Tharwat Posted January 21, 2013 Posted January 21, 2013 Thanks. I misses the s Not a problem . Did my code give you any luck ? 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.