Jump to content

Leaderboard

Popular Content

Showing content with the highest reputation on 07/04/2024 in all areas

  1. Often I have to (ok , I want to) edit text (or blocks) directly on screen that are in a sort of table like order. Then it would be nice to be able sort it in rows & columns. In a perfect world all items would be spaced evenly. But we're not living in a perfect world now are we? Besides , that would be boring. Had something like this written a very long time ago but lately needed to be able to see if sorting order was correct before doing my stuff. So also for the fun of it I created mini app to sort things out (but not in my head) Anyways , added routine including a couple of tiny test functions. My own needs are a little bit more complex because need to be able to apply it on (sometimes specific) attributes in blocks too , but I leave the specialities for you little dragons Working is as follows: Select a group of simple text's (you can use attached drawing). The shape of your selection determines if you sort by row or by column (landscape means rows , portrait means columns. It uses the boundary size from 1st item in selection as a fuzz factor , some blocks are a little up , some a little down etc. This you can check by selecting the blocks on the left side of the sample drawing. After you made selection all insertionpoints (or text alignment points) the points are marked with blue number indication their rank on the social ladder. After this I use (grread) in a loop where you can use Tab to switch between ByRow & ByColumn , Spacebar to cycle in which Quadrant to start numbering and Enter means you're a happy human of planet earth. (C:t1) just shows you the list , (C:t2) you can replace the texts with another string. Rlx-Sort-SS.dwg RlxSortSS.lsp
    1 point
  2. oh, found a function of Lee Mac that does exactly what i want.
    1 point
  3. Code 43 is for global width .. you can also entmod the items without the need to create the layer: (defun c:foo (/ s) (if (setq s (ssget "_X" '((0 . "*POLYLINE") (43 . 0.)))) (foreach e (mapcar 'cadr (ssnamex s)) (entmod (append (entget e) '((8 . "vm_symb_kont"))))) ) (princ) ) You could also use this filter but it only guarantees that the first occurrence is = 0, others could be different. (setq s (ssget "_X" '((0 . "*POLYLINE") (40 . 0.))))
    1 point
  4. You are right the selection set will select all polylines with a width of 0. I'd select this first as a variable: (setq MySS (ssget "_X" (list (cons 0 "*POLYLINE")(cons -4 ">")(cons 40 0.0))) ) Then you need to do something with it. The report you are getting "<Selection Set: 3>" where 3 is the selection set name (specific to that running of the LISP). LISP doesn't know what to do next. You might want something like this to change the selection set to that layer: (command "chprop" MySS "" "LAYER" "-YOUR LAYER NAME-" "")
    1 point
×
×
  • Create New...