Jump to content

Leaderboard

Popular Content

Showing content with the highest reputation on 03/26/2021 in all areas

  1. Its not like that. The codes that I posted allow the user to select as many as they want then you need after that to iterate the selection set and do your stuff at each entity object. e.g: (if (setq ss (ssget '((0 . "*POLYLINE") (8 . "DWG_SHEET") (-4 . "<AND") (-4 . "&=") (70 . 1) (-4 . "AND>")))) (repeat (setq i (sslength ss)) (setq ent (ssname ss (setq i (1- i)))) ;; one entity which is eaual to single selection like, (car (entsel "\nSelect object :")) ;; do your stuff here .... ) )
    2 points
  2. This should work I believe. (defun c:Test ( / int sel ent get str pos) ;; Tharwat - Date: 26.Mar.2021 ;; (and (princ "\nSelect Mleader objects to parse strings after DASH once found : ") (setq int -1 sel (ssget "_:L" '((0 . "MULTILEADER")))) (while (setq int (1+ int) ent (ssname sel int)) (setq get (entget ent) str (assoc 304 get) ) (and (setq pos (vl-string-search "-" (cdr str))) (entmod (subst (cons 304 (substr (cdr str) (+ 2 pos))) str get)) ) ) ) (princ) ) (vl-load-com)
    2 points
  3. You're welcome anytime.
    1 point
  4. Hi, Rectify the layer name "MyLayer" in the following codes to suit yours. (ssget '((0 . "*POLYLINE") (8 . "MyLayer") (-4 . "<AND") (-4 . "&=") (70 . 1) (-4 . "AND>")))
    1 point
  5. I had no idea it did Custom Properties. Good deal LeeMac! Thanks for finding that ILoveMadoka!
    1 point
  6. You can do all this with the usual commands: _Model _Grid _Off -Purge _All _No _zoom _E _tilemode 0 _zoom _E Use this to process multiple drawings - AutoRunLisp commands.txt
    1 point
  7. Something like this. You will need to edit the values. (defun c:ltsc ( / lay ss obj x len) (setq lay (cdr (assoc 8 (entget (car (entsel "\pick line for layer")))))) (setq ss (ssget '((0 . "LINE")(cons 8 lay)))) (repeat (setq x (sslength ss)) (setq obj (vlax-ename->vla-object (ssname ss (setq x (- x 1))))) (setq len (vla-get-length obj)) (cond ((and (> len 0.0001)(<= len 100.0)) (vla-put-LinetypeScale obj 0.9)) ((and (> len 100.001)(<= len 200.0)) (vla-put-LinetypeScale obj 1.9)) ((and (> len 200.0001)(<= len 300.0)) (vla-put-LinetypeScale obj 2.9)) ((and (> len 300.0001)(<= len 400.0)) (vla-put-LinetypeScale obj 3.9)) ((and (> len 400.0001)(<= len 500.0)) (vla-put-LinetypeScale obj 4.9)) ) ) (princ) )
    1 point
  8. OK. Attached is correct lisp. Entirely my fault. arec(1).lsp
    1 point
×
×
  • Create New...