Jump to content

Leaderboard

Popular Content

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

  1. 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
  2. Understand but my V20 Bricscad does not support "CO".
    1 point
  3. Look at post above and this (tblsearch "dimstyle" "TESTDIM50")
    1 point
  4. I just look at each sleeper in UCS World, the secret is two things is it CW or CCW and I have set the pline points so 1st point is lower left. For right hand dual rails the corner point would be top left and offsets as -ve as per your request. I take into account sleeper may be rotated but offsets are from a corner. Working on it maybe tomorrow for code, have the get X&Y working next step is do Excel. I used Bricscad Blockify to turn the "T" into a block will see if 2025 supports that otherwise have to do the find common point of the 3 lines.
    1 point
  5. You could look at Lee Macs string to List function, use the | character as the deliminator: https://lee-mac.com/stringtolist.html (almost the same as what RLX has)
    1 point
  6. Here's another: (mapcar 'vl-princ-to-string (read (strcat "(" (vl-string-translate "|" " " "-1|NCC|2.54|30|0|Auto|0|1|0|2|0|0|2|0|False|0|0") ")") ) ) ;; ("-1" "NCC" "2.54" "30" "0" "AUTO" "0" "1" "0" "2" "0" "0" "2" "0" "FALSE" "0" "0")
    1 point
  7. The string-handling functions in AutoLISP are not the best. car won't help unless you have a list. So let's make a list. Add quotes at beginning and end. Replace each pipe with quote-space-quote. Pull out the third element. Done.
    1 point
  8. like this? ; (SplitStr "a,b" ",") -> ("a" "b") (defun SplitStr (s d / p) (if (setq p (vl-string-search d s))(cons (substr s 1 p)(SplitStr (substr s (+ p 1 (strlen d))) d))(list s))) (nth 2 (splitstr "-1|NCC|2.54|30|0|Auto|0|1|0|2|0|0|2|0|False|0|0" "|"))
    1 point
  9. Selecting or zooming to an entity based on its handle identification code To select an entity based on its handle ID On the command line enter _SELECT When prompted to select objects, enter (HANDENT "HandleID") where HandleID is the handle identification value of the entity. The entity will be selected and highlighted, and you can either continue selecting entities or press ENTER to end the command. To zoom to an entity based on its handle ID On the command line enter _ZOOM Select the Object option. When prompted to Select Objects, enter (HANDENT "HandleID") where HandleID is the handle identification value of the entity. Once the object is selected press ENTER to Zoom to this object.
    1 point
×
×
  • Create New...