Jump to content

Leaderboard

Popular Content

Showing content with the highest reputation on 07/29/2021 in all areas

  1. it works perfectly. great script, nice work. compliments.
    1 point
  2. Hi, Something like this? (defun c:Test (/ *error* int sel ent get ovr csv opn ) ;; Tharwat - 29.Jul.2021 ;; (defun *error* (msg) (and opn (close opn)) (and msg (not (wcmatch (strcase msg) "*CANCEL*,*EXIT*,*BREAK*")) (princ (strcat "\nError =>: " msg))) (princ "\nThis AutoLISP program was written by Tharwat Al Choufi") ) (and (setq int -1 sel (ssget '((0 . "*DIMENSION")))) (setq csv (getfiled "Save as ..." (getvar 'DWGPREFIX) "csv" 1)) (setq opn (open csv "w")) (write-line (strcat "Text Override" "," "Measurement") opn) (while (setq int (1+ int) ent (ssname sel int)) (setq get (entget ent)) (write-line (strcat (if (= (setq ovr (cdr (assoc 1 get))) "") "Null" ovr) "," (vl-princ-to-string (cdr (assoc 42 get)))) opn ) ) ) (*error* nil) (princ) ) (vl-load-com)
    1 point
  3. You're welcome anytime. Here is a new one with a few mods for a better performance and alert. (defun c:Test (/ ssn int sel ent ins lst) ;; Tharwat - 28.Jul.2021 ;; (and (princ "\nSelect Main Text : ") (or (setq sel (ssget "_+.:S" '((0 . "*TEXT")))) (alert "Nothing selected on invalid object. Try again") ) (setq ssn (ssname sel 0) ins (Text:Pt_ (entget ssn)) ) (setq int -1 sel (ssget "_X" (list '(0 . "*TEXT") (cons 410 (getvar 'CTAB)))) ) (progn (while (setq int (1+ int) ent (ssname sel int) ) (or (equal ssn ent) (setq lst (cons (list (Text:Pt_ (entget ent)) ent) lst) ) ) ) lst ) (or (< 1 (length lst)) (alert "Number of text is less than two <!>") ) (sssetfirst nil (ssadd (cadr (cadr (vl-sort lst '(lambda (j k) (< (distance ins (car j)) (distance ins (car k))) ) ) ) ) ) ) ) (princ) ) (vl-load-com) (defun Text:Pt_ (get_) (cdr (assoc (if (or (eq "MTEXT" (cdr (assoc 0 get_))) (and (zerop (cdr (assoc 72 get_))) (zerop (cdr (assoc 73 get_))) ) ) 10 11 ) get_ ) ) )
    1 point
  4. Here is my program that I wrote a few months back to help me to strip Fields in Attributed blocks and I modified it for you to work on texts in groups. Fld2Txt.VLX
    1 point
  5. So, you can open the file, correct? The error pops up when you try to render? I don't know what that unhandled exception is. It could be just about anything. Your profile says you're using 2022. Can you render the file in that version without getting the error? Is it a big file? How much RAM do you have installed? Have you tried running an Audit to see if there are any errors in the file? If you have 2022 installed, why are you trying to render in 2010? Just curious. The problem could be from when you saved the 2018 file down to 2010 format. Autodesk changes the file format every 3 years or so, so maybe there's an issue with saving the file back to an earlier format?
    1 point
×
×
  • Create New...