Jump to content

Leaderboard

Popular Content

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

  1. I think you're probably right Roy; I've also noticed that copying code from the forum can occasionally include invisible characters which appear as part of the code (usually at the end), which are then rendered as question marks in the IDE - I think these are caused by the 'Quote selection' link which appears. @haisagiviz Your subsequent question belongs in a separate thread.
    1 point
  2. I suspect that there is indeed an issue with how @haisagiviz copies code. Maybe this is due to an online translator? Or maybe the code is not saved to a plain text file? In another topic I ended up attaching a Lisp file.
    1 point
  3. Assuming that you only wish to prompt the user once for an initial selection containing both types of object, you would then need to iterate over the selection and separate the entities into two selection sets based on their entity type, for example: (defun c:test ( / dss ent idx mss ) (if (setq mss (ssget "_:L" '((0 . "MTEXT,*DIMENSION")))) (progn (setq dss (ssadd)) (repeat (setq idx (sslength mss)) (setq idx (1- idx) ent (ssname mss idx) ) (if (/= (cdr (assoc 0 (entget ent))) "MTEXT") (progn (ssdel ent mss) (ssadd ent dss) ) ) ) (princ (strcat "\nSelect contained " (itoa (sslength mss)) " MText and " (itoa (sslength dss)) " Dimensions." ) ) ) ) (princ) )
    1 point
  4. Yes, thanks Roy, I see it now : >AND, should be AND> >OR, should be OR> How you notice things amaze me... You are brilliant observer...
    1 point
  5. This really a spelling issue: (defun get_line_by_start_or_endpoint ( x tol /) (ssget "X" (list '(-4 . "<OR") '(-4 . "<AND") '(-4 . "<=,*,*") (list 10 (+ x tol) 0.0 0.0) '(-4 . ">=,*,*") (list 10 (- x tol) 0.0 0.0) '(-4 . "AND>") '(-4 . "<AND") '(-4 . "<=,*,*") (list 11 (+ x tol) 0.0 0.0) '(-4 . ">=,*,*") (list 11 (- x tol) 0.0 0.0) '(-4 . "AND>") '(-4 . "OR>") '(0 . "LINE") '(8 . "0") ) ) ) BTW: You should not use the 'C:' prefix for this type of function.
    1 point
×
×
  • Create New...