Jump to content

Leaderboard

Popular Content

Showing content with the highest reputation on 02/14/2019 in all areas

  1. Thanks both! There is also my Justify Block Base Point for exactly this task.
    1 point
  2. Since the and function uses short-circuit evaluation, your select1obj function may be reduced to: (defun select1obj ( typ msg / ent ) (while (and (setq ent (car (entsel msg))) (not (wcmatch (cdr (assoc 0 (entget ent))) typ)) ) (princ "\nInvalid object selected, please try again.") ) ent ) This also allows the user to dismiss the prompt in order to exit the function (with the function returning nil), without having to force an error by pressing Esc. You might also want to consider the following for a filtered single selection: (ssget "_+.:E:S" '((0 . "LWPOLYLINE")))
    1 point
  3. When using ssget you make a selection set with at least 1 item, you use (sslength ss) to find out how many items, (ssname ss x) where x is the item number to be retrieved. Normally used with a repeat. You can also do a SSADD which adds items so you could keep doing entsel and add more items to a selection set.
    1 point
×
×
  • Create New...