Jump to content

Leaderboard

Popular Content

Showing content with the highest reputation on 09/06/2024 in all areas

  1. Maybe just this - (acad_strlsort) : (defun c:test ( / lst obj atts att file ofile) (setq file (getfiled "Output File" "" "csv" 1)) (setq ofile (open file "w")) (setq ss (ssget '((0 . "INSERT")))) (repeat (setq x (sslength ss)) (setq obj (vlax-ename->vla-object (ssname ss (setq x (- x 1))))) (setq atts (vlax-invoke obj 'Getattributes)) (foreach att atts (if (= (vlax-get att 'tagstring) "CELL_4F3") (setq lst (cons (vlax-get att 'textstring) lst)) ) ) ) (foreach x (acad_strlsort lst) (write-line x ofile) ) (close ofile) (princ) ) (c:test)
    1 point
  2. Not with this application, but such functionality exists in my more recently developed (and arguably more powerful) Batch Attribute Editor application.
    1 point
  3. That's correct; the Arrow keys don't seem to respond to calls within a grread loop. I have a test program that returns the code and data values, and the arrow keys do not return anything.
    1 point
  4. I do and I'm at a loss as to how this could be accomplished. Thanks for your time spent on this.
    1 point
  5. @Steven P That's true of course. The grread however does eliminate the extra "enter" after the X or Y selection, but it's more of just trying to keep with the original intent of the OP. That being said - I think the OP would rather have the X or Y switchable on the fly mid-command, I don't think that will work within the command statement. I'll have to spend more time on it, if I get more time. You are welcome to propose your own solution.
    1 point
  6. A start a work in progress (defun C:textcol ( / X obj ans char1) (setq obj (entget (car (entsel "Pick Mtext" )))) ; do a check for mtext (setq x "130") ; dummy colour number use a getint and rtos note c is rgb C is number (setq str (cdr (assoc 1 obj))) (setq ans "") ; blank string (setq keepgoing 1) ; 1st character (while (<= keepGoing (strlen str)) ; repeat for length of text (setq char1 (substr str keepGoing 1)) (if (and (< 48 (ascii char1))(> 57 (ascii char1))) ; 0 is 48 9 is 57 (setq ans (strcat ans "{\\C" X ";" char1 "}")) ; this allows for a number in middle of text (setq ans (strcat ans char1)) ) (setq keepGoing (+ keepGoing 1)) ) (entmod (subst (cons 1 ans) (assoc 1 obj) obj)) (princ) )
    1 point
×
×
  • Create New...