Jump to content

Leaderboard

Popular Content

Showing content with the highest reputation on 05/15/2022 in all areas

  1. 1 point
  2. @lido FYI in this case you can just concatenate the layer names with comma, like: (8 . "L1,L2") without the use of 'OR" logic operator.
    1 point
  3. ;; (setq SS1 (ssget);(ssget "_X");(get_all_lines_as_SS) (setq SS1 (ssget '((-4 . "<OR") (8 . "L1") (8 . "L2")(-4 . "OR>"))) PTS (get_all_inters_in_ss SS1) ) On line 118 of the program, with the function "ssget", use the logical operator "OR" to restrict the selection to layers "L1" or "L2".
    1 point
  4. Another hint mid pt of 2 pts (setq mp (mapcar '* (mapcar '+ pt1 pt2) '(0.5 0.5)))
    1 point
  5. Mhupp "Also this depends on the direction the polyline is drawn." Pick near end you then check the two end points compared to the pick point and if necessary just reverse the line or pline. There is a problem the straight line is 50.000000 the curved line is 49.9997023888379 so they are different. Given the diff 0.001 in say m or mm its within tolerance for the fudge I have done. Only effects the last point. ; copys blocks from a pline to another (defun C:WOW (/ lendist ent blk blksc obj obj2 path pt pti d1 d2 ss) (vl-load-com) (setq oldsnap (getvar 'osmode)) (setvar 'osmode 0) (setq ent (entget (car (entsel "\nSelect Block: "))) blk (cdr (assoc 2 ent)) blksc (cdr (assoc 41 ent)) ) (setq ent (entsel "\nSelect line: ") pt (cadr ent) obj (vlax-ename->vla-object (car ent)) ) (setq obj2 (vlax-ename->vla-object (car (entsel "\nSelect Path: ")))) (setq len (vla-get-length obj2)) (setq end (vlax-curve-getendpoint Obj) start (vlax-curve-getstartpoint Obj) d1 (distance pt end) d2 (distance pt start) ) (if (< d1 d2) (command "pedit" ent "R" "") ) (setq ss (ssget (list (cons 0 "Insert")(cons 2 blk)))) (repeat (setq x (sslength ss)) (setq pti(cdr (assoc 10 (entget (ssname ss (setq x (1- x))))))) (setq dist (vlax-curve-getdistatpoint obj pti)) (setq pt (vlax-curve-getpointatdist obj2 dist )) (if (= pt nil) (command "-Insert" blk (vlax-curve-getendpoint Obj2) blksc "" 0) (command "-Insert" blk pt blksc "" 0) ) ) (setvar 'osmode oldsnap) (princ) ) (c:WOW)
    1 point
  6. 1 point
×
×
  • Create New...