Jump to content

Leaderboard

Popular Content

Showing content with the highest reputation on 06/03/2025 in all areas

  1. Thank you for correction Sorry @GoldSA. Hm, the third season of the squid game will burn
    1 point
  2. It is the same as doit.xlsx file which are posted by @Danielm103, but with chinees letters.
    1 point
  3. @GoldSA Try this modified code: (prompt "\nTo run a LISP type: COMTXTCSV") (princ) (defun c:COMTXTCSV ( / old_snap ss len i lst file op minPt maxPt ssn lst elast ptlist) (setq old_osnap (getvar 'osmode)) (setvar 'osmode 0) (prompt "\nSelect TEXT or MTEXT:") (setq ss (ssget (list (cons 0 "*TEXT") (cons 8 "?????"))) ;; (cons 62 1) len (sslength ss) i 0 lst (list) ) (setq file (getfiled "Choose file save destination" "" "csv" 1) op (open file "w") ) (while (< i len) (vla-GetBoundingBox (vlax-ename->vla-object (ssname ss i)) 'minPt 'maxPt) (setq minPt (vlax-safearray->list minPt) maxPt (vlax-safearray->list maxPt) ssn (ssget "_F" (list minPt maxPt) (list (cons 0 "*TEXT") (cons 8 "TEXT"))) ;; (cons 62 4) ) (if (/= ssn nil) (setq lst (cons (list (cdr (assoc 1 (entget (ssname ss i)))) (cdr (assoc 1 (entget (ssname ssn 0))))) lst)) (progn (command-s "_RECTANG" minPt maxPt) (setq elast (entlast) ptlist (mapcar 'cdr (vl-remove-if-not (function (lambda (x) (= (car x) 10))) (entget elast))) ssn (ssget "_CP" ptlist (list (cons 0 "*TEXT") (cons 8 "TEXT"))) ;; (cons 62 4) ) (if (/= ssn nil) (setq lst (cons (list (cdr (assoc 1 (entget (ssname ss i)))) (cdr (assoc 1 (entget (ssname ssn 0))))) lst)) ) ) ) (setq i (1+ i)) ) (foreach val lst (write-line (strcat (car val) "," (cadr val)) op) ) (close op) (setvar 'osmode old_osnap) (prompt (strcat "\nThe text values are written in " (vl-filename-base file) ".csv!")) (princ) ) After executing the modified code, I get this (chinees letters transformed into to the unicod chars, doesn't going to be problem for you): Best regards.
    1 point
  4. I used python and a KDTree to pair up the texts There was challenge over at the swamp pairing a line with text https://www.theswamp.org/index.php?topic=59487.0 Could be a source of inspiration for pairing up text items. The fastest is using a language with a KDTree, for lisp, Lee Mac’s code was pretty impressive https://www.theswamp.org/index.php?topic=59487.msg620760#msg620760
    1 point
×
×
  • Create New...