Jump to content

Recommended Posts

Posted

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

Posted

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

Posted

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

 

:)

Posted
@Tharwat, that could be shortened to:

 

Certainly , and nicely done . :thumbsup:

Posted

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.

Posted
Apparently it is done but I can't see the points.

 

Perhaps the program failed to create the points?

Posted
@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?

Posted
showpoint or showpoints ?

 

Thanks. I misses the s

Posted
Thanks. I misses the s

 

Not a problem .

 

Did my code give you any luck ?

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