Jump to content

All Activity

This stream auto-updates

  1. Today
  2. Steven P

    Split 1 Text into 2

    I'd go string to List, splits at every character '-' and you can make up the texts to suit from that
  3. Steven P

    case sensitivity

    I want a go.... See.... 25...
  4. mhupp

    case sensitivity

    Two choices per letter upper or lower case 5 letters 2^5 = 32 possible choices. either do it lee's way (best) or use the strcase funciton to convert everything to upper case and check that way.
  5. Tsuky

    Lisp to move texts

    A start with the following. I leave it to you to improve it at your convenience but I think it is difficult to meet all your requirements because the slightest modification can lead to other overlaps which were not present at the start. (defun draw_tbox ( e / dxf_ent p0 ang sin_a cos_a t_box l_box) (setq dxf_ent (entget e) p0 (cdr (assoc 10 dxf_ent)) ang (cdr (assoc 50 dxf_ent)) sin_a (sin ang) cos_a (cos ang) t_box (textbox dxf_ent) l_box (mapcar '(lambda (x) (list (+ (car p0) (- (* (car x) cos_a) (* (cadr x) sin_a) ) ) (+ (cadr p0) (+ (* (car x) sin_a) (* (cadr x) cos_a) ) ) ) ) (append t_box (list (list (caadr t_box) (cadar t_box) (caddar t_box)) (list (caar t_box) (cadadr t_box) (caddr (cadr t_box))) ) ) ) ) (entmake (list '(0 . "LWPOLYLINE") '(100 . "AcDbEntity") (cons 67 (if (eq (getvar "CVPORT") 1) 1 0)) (cons 410 (if (eq (getvar "CVPORT") 1) (getvar "CTAB") "Model")) (cons 8 (getvar "CLAYER")) (cons 62 (atoi (getvar "CECOLOR"))) (cons 6 (getvar "CELTYPE")) (cons 370 (getvar "CELWEIGHT")) '(100 . "AcDbPolyline") '(90 . 4) (if (eq (getvar "PLINEGEN") 1) '(70 . 129) '(70 . 1)) (cons 43 (getvar "PLINEWID")) (cons 38 (getvar "ELEVATION")) (cons 39 (getvar "THICKNESS")) (cons 10 (car l_box)) '(40 . 0.0) '(41 . 0.0) '(42 . 0.0) '(91 . 0) (cons 10 (caddr l_box)) '(40 . 0.0) '(41 . 0.0) '(42 . 0.0) '(91 . 0) (cons 10 (cadr l_box)) '(40 . 0.0) '(41 . 0.0) '(42 . 0.0) '(91 . 0) (cons 10 (cadddr l_box)) '(40 . 0.0) '(41 . 0.0) '(42 . 0.0) '(91 . 0) (assoc 210 dxf_ent) ) ) ) (defun c:TEST ( / ss_keep ss_work n ent_k tmp_k obj_k ent_w tmp_w obj_w vrt_pt) (setq ss_keep (ssget "_X" (list '(0 . "TEXT") (cons 67 (if (eq (getvar "CVPORT") 1) 1 0)) (cons 410 (if (eq (getvar "CVPORT") 1) (getvar "CTAB") "Model")) '(8 . "CONDUIT") '(62 . 6) '(40 . 2.0) '(7 . "Standard") ) ) ) (setq ss_work (ssget "_X" (list '(0 . "TEXT") (cons 67 (if (eq (getvar "CVPORT") 1) 1 0)) (cons 410 (if (eq (getvar "CVPORT") 1) (getvar "CTAB") "Model")) '(8 . "INTERSECTION") '(62 . 4) '(40 . 2.0) '(7 . "Standard") ) ) ) (cond ((and ss_keep ss_work) (repeat (setq n (sslength ss_keep)) (setq ent_k (ssname ss_keep (setq n (1- n)))) (draw_tbox ent_k) (setq tmp_k (entlast) obj_k (vlax-ename->vla-object tmp_k) ) (repeat (setq i (sslength ss_work)) (setq ent_w (ssname ss_work (setq i (1- i)))) (draw_tbox ent_w) (setq tmp_w (entlast) obj_w (vlax-ename->vla-object tmp_w) vrt_pt (vlax-variant-value (vla-IntersectWith obj_k obj_w 0)) ) (if (>= (vlax-safearray-get-u-bound vrt_pt 1) 0) (entmod (subst (assoc 50 (entget ent_k)) (assoc 50 (entget ent_w)) (entget ent_w))) ) (entdel tmp_w) ) (entdel tmp_k) ) ) ) (prin1) )
  6. Yesterday
  7. Post image etc no idea what you want.
  8. saunambon654

    case sensitivity

    1. floor 2. Floor 3. fLoor 4. flOor 5. floOr 6. flooR 7. FLoor 8. FlOor 9. FloOr 10. FlooR 11. fLOor 12. fLoOr 13. fLooR 14. flOOr 15. flOoR 16. floOR 17. FLOor 18. FLoOr 19. FLooR 20. fLOOr 21. fLOoR 22. fLoOR 23. flOOR 24. fLOOR 25. FLOOR
  9. Tharwat

    Split 1 Text into 2

    As simple as follows: (setq str "VAR-259") (and (setq pos (vl-string-search "-" str)) (setq pre (substr str 1 pos)) ;; = VAR (setq suf (substr str (+ pos 2))) ;; = 259 )
  10. marko_ribar

    case sensitivity

    I've changed my last post - I founded 16 cases, so it's not neither 25, nor 60...
  11. ronjonp

    Split 1 Text into 2

    http://www.lee-mac.com/stringtolist.html
  12. rungruang

    Drawing rectangle with hatch

    want to solid color fill same the color bylayer pleas .
  13. Is it possible to split 1 text into 2 separate texts, based on character "-"? For example, can I split VAR-259 into VAR -259 Thank you all.
  14. marko_ribar

    case sensitivity

    There are more than 25 cases... Combinations are included : 5!/2! = 60 cases... I think that Steven P is right - 25 cases... Actually I've found 16 cases... Here is what I founded : 1.floor 2.fLoor 3.flOor 4.floOr 5.flooR 6.Floor 7.FlOor 8.FloOr 9.FlooR 10.FLoor 11.FLoOr 12.FLooR 13.FLOor 14.FLOOr 15.FLOoR 16.FLOOR
  15. I had this problem. But got the drawing back this way: Open Autocad Type RECOVER find your corrupted drawing Let Autocad recover it. Worked for me. I hope that helps.
  16. Steven P

    case sensitivity

    But in all practicality, only these 3 will ever be used, very unlikely to have "floOr9" for example. Lee Macs example covers all 25 cases well
  17. saunambon654

    case sensitivity

    Actually there are many cases. There are 5 letters, so there are 5^2 = 25 cases.
  18. saunambon654

    case sensitivity

    Thank you, Lee! It is totally what I need.
  19. Lee Mac

    case sensitivity

    (ssget "W" pt1 pt2 '((0 . "TEXT") (1 . "[Ff][Ll][Oo][Oo][Rr]9")))
  20. This was pure gold. Thank you very much!!!!
  21. If you need to write text in UCS/=WCS at some 3D angle, you should firstly align view to UCS with PLAN command... Next step is start and write text with above posted code... Regards, M.R.
  22. I'll check that but that is better code - far shorter than the one I found out
  23. marko_ribar

    case sensitivity

    (setq ss1 (ssget "W" pt1 pt2 '((0. "TEXT")(1 . "FLOOR9,Floor9,floor9"))))
  24. Should work as desired... (defun c:txtby2pts ( / p1 p2 txt txtbox v w h ) (initget 1) (setq p1 (getpoint "\nFirst point : ")) (initget 1) (setq p2 (getcorner p1 "\nSecond point : ")) (setq txt (getstring t "\nText : ")) (vl-cmdf "_.text" "_j" "_l" "_non" p1 1.0 0.0 txt) (setq txtbox (textbox (list (assoc 1 (entget (entlast)))))) (setq v (mapcar '- p2 p1)) (setq w (car v) h (cadr v)) (vl-cmdf "_.scale" (entlast) "" "_non" p1 h) (setpropertyvalue (entlast) "WidthFactor" (/ (/ w h) (- (caadr txtbox) (caar txtbox)))) (princ) ) HTH. M.R.
  25. Dear team, Is there any plugin, DLL, tools for C3D for draw automatic dimensions on multiple earthworks cross section. I try by code set but that is not dimension, that is a label with line ,text object . Required dimensions with dim style. And is there any website for PKT file to download, I am mostly looking for road and bridge infrastructure projects, like mse wall, concrete barrier, underpass,kerb,etc. Thanks
  1. Load more activity
×
×
  • Create New...