<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Re: Search name Tag names &amp;amp; modify in Visual LISP, AutoLISP and General Customization Forum</title>
    <link>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/search-name-tag-names-amp-modify/m-p/10965111#M63551</link>
    <description>&lt;P&gt;Amazing, Thanks it works !&lt;/P&gt;&lt;P&gt;Sorry for the late reply !&lt;/P&gt;</description>
    <pubDate>Tue, 22 Feb 2022 14:18:38 GMT</pubDate>
    <dc:creator>Automohan</dc:creator>
    <dc:date>2022-02-22T14:18:38Z</dc:date>
    <item>
      <title>Search name Tag names &amp; modify</title>
      <link>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/search-name-tag-names-amp-modify/m-p/10120562#M63544</link>
      <description>&lt;P&gt;I have a&amp;nbsp;&lt;SPAN&gt;huge number of Attribute blocks to be cleaned with multiple projects by Script !&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;A lisp will search for same Tags names &amp;amp; rename it as per&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;what ever you choose:&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;SCALE_1&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;SCALE_2&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT color="#0000FF"&gt;&lt;SPAN&gt;always upper tag name is the scale of A1 size&lt;/SPAN&gt;&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT color="#0000FF"&gt;&lt;SPAN&gt;&amp;nbsp; &amp;nbsp; "&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; below tag name is the scale of A3 size&lt;/SPAN&gt;&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT color="#000000"&gt;&lt;SPAN&gt;You can choose whether &lt;/SPAN&gt;&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT color="#000000"&gt;&lt;SPAN&gt;SCALE_1 &amp;amp; SCALE_2 or SCALE_A1 &amp;amp; SCALE_A3 or SCALE1 &amp;amp; SCALE2&lt;/SPAN&gt;&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;FONT color="#000000"&gt;&lt;SPAN&gt;Any help will be greatly appreciated.&lt;/SPAN&gt;&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT color="#000000"&gt;&lt;SPAN&gt;Say block name is "Attribute Drawing Title"&lt;/SPAN&gt;&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Attribute same tag.jpg" style="width: 643px;"&gt;&lt;img src="https://forums.autodesk.com/t5/image/serverpage/image-id/887002i13A65A4831E59914/image-size/large?v=v2&amp;amp;px=999" role="button" title="Attribute same tag.jpg" alt="Attribute same tag.jpg" /&gt;&lt;/span&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 01 Mar 2021 13:48:26 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/search-name-tag-names-amp-modify/m-p/10120562#M63544</guid>
      <dc:creator>Automohan</dc:creator>
      <dc:date>2021-03-01T13:48:26Z</dc:date>
    </item>
    <item>
      <title>Re: Search name Tag names &amp; modify</title>
      <link>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/search-name-tag-names-amp-modify/m-p/10120633#M63545</link>
      <description>&lt;P&gt;&lt;a href="https://forums.autodesk.com/t5/user/viewprofilepage/user-id/3182964"&gt;@Automohan&lt;/a&gt;&amp;nbsp; hi,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;In databse therse is no garanty that the list of attributes would be in the order it shows in Block Attribute Manager, how would the program know if the first SACLE&amp;nbsp; is A1?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Instead of using two SCALE attributes, is it possiable to merge them and set it to "1:1000, 1:2000" (if it's mtext then it could be in two lines)&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Moshe&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 01 Mar 2021 14:12:49 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/search-name-tag-names-amp-modify/m-p/10120633#M63545</guid>
      <dc:creator>Moshe-A</dc:creator>
      <dc:date>2021-03-01T14:12:49Z</dc:date>
    </item>
    <item>
      <title>Re: Search name Tag names &amp; modify</title>
      <link>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/search-name-tag-names-amp-modify/m-p/10120665#M63546</link>
      <description>&lt;P&gt;Please attach an example of the original dwg file, and an example of how it should be.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 01 Mar 2021 14:27:40 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/search-name-tag-names-amp-modify/m-p/10120665#M63546</guid>
      <dc:creator>maratovich</dc:creator>
      <dc:date>2021-03-01T14:27:40Z</dc:date>
    </item>
    <item>
      <title>Re: Search name Tag names &amp; modify</title>
      <link>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/search-name-tag-names-amp-modify/m-p/10122868#M63547</link>
      <description>&lt;P&gt;Thanks for your suggestion to my thread, Yes Mtext will do one or more lines of text&lt;/P&gt;&lt;P&gt;so not possible with a script with load lisp to modify, I will do manually by opening each dwg,&lt;/P&gt;&lt;P&gt;there were available lisps to change Tag name.&lt;/P&gt;</description>
      <pubDate>Tue, 02 Mar 2021 08:25:11 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/search-name-tag-names-amp-modify/m-p/10122868#M63547</guid>
      <dc:creator>Automohan</dc:creator>
      <dc:date>2021-03-02T08:25:11Z</dc:date>
    </item>
    <item>
      <title>Re: Search name Tag names &amp; modify</title>
      <link>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/search-name-tag-names-amp-modify/m-p/10128984#M63548</link>
      <description>&lt;P&gt;Are you looking to find a program that will detect mutiple tag names in a block / Rename / Re-populate the values?&lt;/P&gt;
&lt;P&gt;Will there me more than just one named TAG that ahve multiples in a block?&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Or you just looking for something specific to work on your block?&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 04 Mar 2021 07:55:30 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/search-name-tag-names-amp-modify/m-p/10128984#M63548</guid>
      <dc:creator>pbejse</dc:creator>
      <dc:date>2021-03-04T07:55:30Z</dc:date>
    </item>
    <item>
      <title>Re: Search name Tag names &amp; modify</title>
      <link>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/search-name-tag-names-amp-modify/m-p/10129889#M63549</link>
      <description>&lt;P&gt;Looking for a Lisp program to load with Script to run with multiple files...&lt;/P&gt;&lt;P&gt;I just wanted to correct the errors of the &lt;FONT color="#0000FF"&gt;Tag names only&lt;/FONT&gt;, the values should remain same.....&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 04 Mar 2021 13:33:27 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/search-name-tag-names-amp-modify/m-p/10129889#M63549</guid>
      <dc:creator>Automohan</dc:creator>
      <dc:date>2021-03-04T13:33:27Z</dc:date>
    </item>
    <item>
      <title>Re: Search name Tag names &amp; modify</title>
      <link>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/search-name-tag-names-amp-modify/m-p/10130346#M63550</link>
      <description>&lt;BLOCKQUOTE&gt;&lt;HR /&gt;&lt;a href="https://forums.autodesk.com/t5/user/viewprofilepage/user-id/3182964"&gt;@Automohan&lt;/a&gt;&amp;nbsp;wrote:&lt;BR /&gt;
&lt;P&gt;Looking for a Lisp program to load with Script to run with multiple files...&lt;/P&gt;
&lt;P&gt;I just wanted to correct the errors of the &lt;FONT color="#0000FF"&gt;Tag names only&lt;/FONT&gt;, the values should remain same.....&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;HR /&gt;&lt;/BLOCKQUOTE&gt;
&lt;P&gt;Seems to work with limited testing. [ multiple similar tags ]&lt;/P&gt;
&lt;LI-CODE lang="lisp"&gt;(defun c:RDT (/ _vl-remove_f _replace aDoc ss e atbv f process) ; RenameDuplicateTag
  ;;		pBe Mar 2021			;;;
  (Defun _vl-remove_f (k l m)
    ((if m
       vl-remove-if
       vl-remove-if-not
     )
      '(lambda (b)
	 (member (Car b) k)
       )
      l
    )
  )
  (defun _replace (l lst)
    (foreach m l
      (mapcar '(lambda (o / tbr)
		 (setq tbr (assoc (Car m) lst))
		 (setq lst (subst (list o (cadr tbr)) tbr lst))
	       )
	      (Cadr m)
      )
    )
    lst
  )
  (setq aDoc (vla-get-ActiveDocument (vlax-get-acad-object)))
  (if (setq ss (ssget "_X" '((0 . "INSERT") (66 . 1))))
    (repeat (Setq i (sslength ss))
      (setq e (vlax-ename-&amp;gt;vla-object (ssname ss (setq i (1- i)))))
      (setq atbv (mapcar '(lambda (at)
			    (list (vla-get-tagstring at)
				  (vla-get-textstring at)
			    )
			  )
			 (vlax-invoke e 'Getattributes)
		 )
      )

      (cond
	((setq f (assoc (setq fnm (vla-get-EffectiveName e)) process))
	 (setq process (vl-remove f process)
	       process (Cons (list (Car f)
				   (cons (list e (_replace d atbv))
					 (cadr f)
				   )
			     )
			     process
		       )
	 )
	)
	((setq d
		((lambda (b / l a s)
		   (vlax-for atbb b
		     (if (eq (Vla-get-objectname atbb)
			     "AcDbAttributeDefinition"
			 )
		       (setq
			 l (cons (list (vla-get-tagstring atbb) atbb) l)
		       )
		     )
		   )
		   (while (setq a (car l))
		     (if
		       (&amp;gt; (length
			    (setq p (_vl-remove_f (list (Car a)) l pbe_))
			  )
			  1
		       )
			(Setq s (cons p s))
		     )
		     (setq l (_vl-remove_f (list (Car a)) l t))
		   )
		   (mapcar
		     '(lambda (j / n)
			(setq n 0)
			(list
			  (Caar j)
			  (mapcar
			    '(lambda (k)
			       (vla-put-tagstring
				 (cadr k)
				 (setq nn (strcat (car k) "_" (itoa (setq n (1+ n)))))
			       )
			       nn
			     )
			    (reverse j)
			  )
			)
		      )
		     s
		   )
		 )
		  (vla-item (vla-get-blocks aDoc) fnm)
		)
	 )
	 (setq process (cons (list fnm
				   (list (list e (_replace d atbv)))
			     )
			     process
		       )
	 )
	)
      )
    )
  )
  (foreach blk process
    (command "_Attsync" "_name" (car blk))
    (foreach blkobj (cadr blk)
      (foreach at (vlax-invoke (car blkobj) 'Getattributes)
	(if (setq m (assoc (vla-get-tagstring at) (cadr blkobj)))
	  (Vla-put-textstring at (cadr m))
	)
      )
    )
  )
  (princ)
)&lt;/LI-CODE&gt;
&lt;P&gt;HTH&lt;/P&gt;</description>
      <pubDate>Thu, 04 Mar 2021 15:25:15 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/search-name-tag-names-amp-modify/m-p/10130346#M63550</guid>
      <dc:creator>pbejse</dc:creator>
      <dc:date>2021-03-04T15:25:15Z</dc:date>
    </item>
    <item>
      <title>Re: Search name Tag names &amp; modify</title>
      <link>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/search-name-tag-names-amp-modify/m-p/10965111#M63551</link>
      <description>&lt;P&gt;Amazing, Thanks it works !&lt;/P&gt;&lt;P&gt;Sorry for the late reply !&lt;/P&gt;</description>
      <pubDate>Tue, 22 Feb 2022 14:18:38 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/search-name-tag-names-amp-modify/m-p/10965111#M63551</guid>
      <dc:creator>Automohan</dc:creator>
      <dc:date>2022-02-22T14:18:38Z</dc:date>
    </item>
  </channel>
</rss>

