Jump to content

Leaderboard

Popular Content

Showing content with the highest reputation on 07/30/2019 in all areas

  1. OK. If your want to use this with alphabetical text two lines would require changes The if statement here should be : (foreach att atts (if (setq n (vl-position (strcase (vlax-get-property att 'textstring)) (mapcar 'strcase o_lst))) (vlax-put-property att 'textstring (nth n n_lst))) );end_foreach And likewise here (if (setq n (vl-position (strcase (vlax-get-property obj 'textstring)) (mapcar 'strcase o_lst))) (vlax-put-property obj 'textstring (nth n n_lst)))
    1 point
  2. The block name may be case insensitive but the checks ARE Convert everthing to uppercase (setq lst (cons (cons (strcase (vla-get-name i)) i) lst))) (setq flag (member (strcase "QkDotOnBar") blocklist))
    1 point
  3. Or try this (defun c:REPLACER ( / o_lst n_lst ss_blk cnt blk atts n ss_txt obj) (setq o_lst (list "06/13/19" "06/14/19" "07/22/19") n_lst (list "07/26/19" "07/26/19" "07/26/19") ss_blk (ssget "x" '((0 . "INSERT") (66 . 1))) );end_setq (cond (ss_blk (repeat (setq cnt (sslength ss_blk)) (setq blk (vlax-ename->vla-object (ssname ss_blk (setq cnt (1- cnt)))) atts (vlax-invoke blk 'getattributes) );end_setq (foreach att atts (if (setq n (vl-position (vlax-get-property att 'textstring) o_lst)) (vlax-put-property att 'textstring (nth n n_lst))) );end_foreach );end_repeat ) );end_cond (setq ss_txt (ssget "x" '((0 . "TEXT")))) (cond (ss_txt (repeat (setq cnt (sslength ss_txt)) (setq obj (vlax-ename->vla-object (ssname ss_txt (setq cnt (1- cnt))))) (if (setq n (vl-position (vlax-get-property obj 'textstring) o_lst)) (vlax-put-property obj 'textstring (nth n n_lst))) );end_repeat ) );end_cond (princ) );end_defun (vl-load-com) (princ)
    1 point
  4. Block Names are not case sensitive therefore to Autocad "qwerty" is the same as "QWERTY" or "QwErTy"
    1 point
  5. a hint Syntax: (FindReplaceAll "old string" "new string")
    1 point
  6. You're are entirely welcomed. Happy to be of assistance.
    1 point
  7. You could also use my Script Writer program to run your existing AutoLISP program across multiple drawings.
    1 point
×
×
  • Create New...