<?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: vla-put-tagstring problem in Visual LISP, AutoLISP and General Customization Forum</title>
    <link>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/vla-put-tagstring-problem/m-p/10711139#M53673</link>
    <description>&lt;P&gt;Hello John&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks for the tip, but it does not work&lt;/P&gt;&lt;P&gt;Result is still the same, the attribute tag name is not updates but the prompt is "erased" as you can see in the screen dumps attached to my initial message&lt;/P&gt;&lt;P&gt;There's also a zip file with data attached&lt;/P&gt;&lt;P&gt;I really don't understand what's happening, must be overlooking the obvious&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Patrick&lt;/P&gt;</description>
    <pubDate>Mon, 25 Oct 2021 08:37:08 GMT</pubDate>
    <dc:creator>Patrick.De.Neef</dc:creator>
    <dc:date>2021-10-25T08:37:08Z</dc:date>
    <item>
      <title>vla-put-tagstring problem</title>
      <link>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/vla-put-tagstring-problem/m-p/10703810#M53671</link>
      <description>&lt;P&gt;Hello All&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;need a little bit of help here&lt;/P&gt;&lt;P&gt;Trying to modify the attribute tag name via vla-put-tagstring&lt;/P&gt;&lt;P&gt;the following code does everything I want it to do, except the vla-put-tagstring&lt;/P&gt;&lt;P&gt;Actually it removes the attribute prompt (please see screendumps)&lt;/P&gt;&lt;P&gt;I must be overlooking something basic&lt;/P&gt;&lt;P&gt;Please don't tell me that the code looks awful, I know &lt;span class="lia-unicode-emoji" title=":downcast_face_with_sweat:"&gt;😓&lt;/span&gt;, it is not optimized, just tried to divide it up into every possible single piece to see what is going wrong&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="lisp"&gt;(vlax-for obj
    (vla-item (vla-get-Blocks (vla-get-Document blockobj))
      (if (vlax-property-available-p blockobj 'EffectiveName)
        (vla-get-EffectiveName blockobj)
        (vla-get-Name blockobj)
      )
    )
	
    (if (eq "AcDbAttributeDefinition" (vla-get-ObjectName obj))
		(progn
			(setq Blk_Tag (vla-get-TagString obj))
			(setq Blk_XYZ (vlax-safearray-&amp;gt;list (vlax-variant-value (vla-get-insertionpoint obj))))
			(setq Blk_Prm (vla-get-PromptString obj))
			(setq Blk_X (rtos(car Blk_XYZ) 2 0 ))
			(setq Blk_Y (rtos(cadr Blk_XYZ) 2 0 ))
			(princ "Blk_Tag = ")(princ Blk_Tag)(princ "\t")(princ "Blk_X = ")(princ Blk_X)(princ "\t")(princ "Blk_Y = ")(princ Blk_Y)(princ "\t")(princ "Blk_Prm = ")(princ Blk_Prm)(princ "\n")
			(foreach line Exl_Attrib_Info
				(if (/= (car line) "Column1")
				(progn
				(setq Exl_Tag (nth 0 line))
				(setq Exl_Prm (nth 1 line))
				(setq Exl_X (nth 2 line))
				(setq Exl_Y (nth 3 line))
				(setq Exl_NewTag (nth 4 line))
					(if (and ( = Blk_tag Exl_Tag)
							 ( = Blk_Prm Exl_Prm)
							 ( = Blk_X Exl_X)
							 ( = Blk_Y Exl_Y))
					(progn
					(princ "found correct settings \t")(princ "Old Prompt = ")(princ Blk_Prm)(princ "\t")(princ "New Tag Will be = ")(princ Exl_NewTag)(princ "\n")
					(setq result (vla-put-tagstring obj Exl_NewTag))
					(princ "result = ")(princ result)(princ "\n")
					))
				))
			)
				
	))
;		
 )&lt;/LI-CODE&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;&lt;P&gt;(the variable Exl_Attrib_Info comes from an excel file and is correct)&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="result.png" style="width: 430px;"&gt;&lt;img src="https://forums.autodesk.com/t5/image/serverpage/image-id/979984i4F9175A23A5CA6A8/image-size/large?v=v2&amp;amp;px=999" role="button" title="result.png" alt="result.png" /&gt;&lt;/span&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="start.png" style="width: 420px;"&gt;&lt;img src="https://forums.autodesk.com/t5/image/serverpage/image-id/979985i48E2D8883FFBB473/image-size/large?v=v2&amp;amp;px=999" role="button" title="start.png" alt="start.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;thanks in advance&lt;/P&gt;&lt;P&gt;Patrick&lt;/P&gt;</description>
      <pubDate>Fri, 22 Oct 2021 07:34:51 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/vla-put-tagstring-problem/m-p/10703810#M53671</guid>
      <dc:creator>Patrick.De.Neef</dc:creator>
      <dc:date>2021-10-22T07:34:51Z</dc:date>
    </item>
    <item>
      <title>Re: vla-put-tagstring problem</title>
      <link>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/vla-put-tagstring-problem/m-p/10710227#M53672</link>
      <description>&lt;P&gt;The only problem that jumps out at me is that the result will be nil...&lt;/P&gt;
&lt;LI-CODE lang="lisp"&gt;(setq result (vla-put-tagstring obj Exl_NewTag))&lt;/LI-CODE&gt;
&lt;P&gt;&amp;nbsp;because all vla-puts and vlax-puts return nil I'm pretty sure.&lt;/P&gt;
&lt;P&gt;But does the attribute show the desired result?&lt;/P&gt;
&lt;P&gt;Anyway, I prefer to use vlax-get/put... because it takes and returns plain AutoLisp lists, etc. as in&lt;/P&gt;
&lt;LI-CODE lang="lisp"&gt;(vlax-put obj 'tagstring Exl_NewTag)&lt;/LI-CODE&gt;
&lt;P&gt;You don't have to jerk around with variants and safearrays.&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Sun, 24 Oct 2021 18:15:43 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/vla-put-tagstring-problem/m-p/10710227#M53672</guid>
      <dc:creator>john.uhden</dc:creator>
      <dc:date>2021-10-24T18:15:43Z</dc:date>
    </item>
    <item>
      <title>Re: vla-put-tagstring problem</title>
      <link>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/vla-put-tagstring-problem/m-p/10711139#M53673</link>
      <description>&lt;P&gt;Hello John&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks for the tip, but it does not work&lt;/P&gt;&lt;P&gt;Result is still the same, the attribute tag name is not updates but the prompt is "erased" as you can see in the screen dumps attached to my initial message&lt;/P&gt;&lt;P&gt;There's also a zip file with data attached&lt;/P&gt;&lt;P&gt;I really don't understand what's happening, must be overlooking the obvious&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Patrick&lt;/P&gt;</description>
      <pubDate>Mon, 25 Oct 2021 08:37:08 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/vla-put-tagstring-problem/m-p/10711139#M53673</guid>
      <dc:creator>Patrick.De.Neef</dc:creator>
      <dc:date>2021-10-25T08:37:08Z</dc:date>
    </item>
    <item>
      <title>Re: vla-put-tagstring problem</title>
      <link>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/vla-put-tagstring-problem/m-p/10711265#M53674</link>
      <description>&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;- The examples in the documentation also call vla-Update on the object, has that any effect?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;- Your examples seem to show two different attributes with the same tag. That may cause problems if the program modifies the wrong one.&lt;/P&gt;</description>
      <pubDate>Mon, 25 Oct 2021 09:31:42 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/vla-put-tagstring-problem/m-p/10711265#M53674</guid>
      <dc:creator>martti.halminen</dc:creator>
      <dc:date>2021-10-25T09:31:42Z</dc:date>
    </item>
    <item>
      <title>Re: vla-put-tagstring problem</title>
      <link>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/vla-put-tagstring-problem/m-p/10711657#M53675</link>
      <description>&lt;P&gt;Hello Martti&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;replacing the duplicate attribute tags is exactly what I am trying to do &lt;span class="lia-unicode-emoji" title=":disappointed_face:"&gt;😞&lt;/span&gt;&lt;/P&gt;&lt;P&gt;adding vla-update did not help&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;P.&lt;/P&gt;</description>
      <pubDate>Mon, 25 Oct 2021 12:42:51 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/vla-put-tagstring-problem/m-p/10711657#M53675</guid>
      <dc:creator>Patrick.De.Neef</dc:creator>
      <dc:date>2021-10-25T12:42:51Z</dc:date>
    </item>
    <item>
      <title>Re: vla-put-tagstring problem</title>
      <link>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/vla-put-tagstring-problem/m-p/10712053#M53676</link>
      <description>&lt;P&gt;I don't see anything that would "erase" the prompt.&lt;/P&gt;
&lt;P&gt;Are you sure about the order of values in the Excel file?&lt;/P&gt;
&lt;P&gt;Are you sure that the Excel data are all strings rounded to the whole number?&lt;/P&gt;
&lt;P&gt;How about if you try confirming the change...&lt;/P&gt;
&lt;LI-CODE lang="general"&gt;    (vla-put-tagstring obj Exl_NewTag)
    (princ "result = ")
    (princ (vlax-get obj 'Tagstring))
    (princ "\n")
&lt;/LI-CODE&gt;
&lt;P&gt;Then maybe you need to do an update on the block definition and/or a regen.&lt;/P&gt;</description>
      <pubDate>Mon, 25 Oct 2021 15:04:29 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/vla-put-tagstring-problem/m-p/10712053#M53676</guid>
      <dc:creator>john.uhden</dc:creator>
      <dc:date>2021-10-25T15:04:29Z</dc:date>
    </item>
    <item>
      <title>Re: vla-put-tagstring problem</title>
      <link>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/vla-put-tagstring-problem/m-p/10713537#M53677</link>
      <description>&lt;P&gt;Hello All&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;can someone explain me the following and tell me that I am not getting&amp;nbsp; ... &lt;span class="lia-unicode-emoji" title=":face_savoring_food:"&gt;😋&lt;/span&gt;&lt;/P&gt;&lt;P&gt;After I ran the lisp program, eattedit always tells me that the attribute tag is not changed&lt;/P&gt;&lt;P&gt;However, this morning lightning struck my old brain and I tried BATTMAN&lt;/P&gt;&lt;P&gt;guess what ... this lovely command (and another lisp that I wrote) tells me everything is OK&lt;/P&gt;&lt;P&gt;so, what's wrong with eattedit ???&lt;/P&gt;&lt;P&gt;Please have a look at the attached word document &lt;span class="lia-unicode-emoji" title=":grinning_face:"&gt;😀&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Patrick&lt;/P&gt;</description>
      <pubDate>Tue, 26 Oct 2021 07:10:29 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/vla-put-tagstring-problem/m-p/10713537#M53677</guid>
      <dc:creator>Patrick.De.Neef</dc:creator>
      <dc:date>2021-10-26T07:10:29Z</dc:date>
    </item>
    <item>
      <title>Re: vla-put-tagstring problem</title>
      <link>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/vla-put-tagstring-problem/m-p/10714192#M53678</link>
      <description>&lt;P&gt;Did you ran _.attsync command ?&lt;/P&gt;</description>
      <pubDate>Tue, 26 Oct 2021 11:58:20 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/vla-put-tagstring-problem/m-p/10714192#M53678</guid>
      <dc:creator>kpblc2000</dc:creator>
      <dc:date>2021-10-26T11:58:20Z</dc:date>
    </item>
    <item>
      <title>Re: vla-put-tagstring problem</title>
      <link>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/vla-put-tagstring-problem/m-p/10714283#M53679</link>
      <description>&lt;P&gt;I think you're getting&amp;nbsp;&lt;span class="lia-unicode-emoji" title=":confounded_face:"&gt;😖&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;Are you sure an update here and there won't bring it around?&lt;/P&gt;</description>
      <pubDate>Tue, 26 Oct 2021 12:30:30 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/vla-put-tagstring-problem/m-p/10714283#M53679</guid>
      <dc:creator>john.uhden</dc:creator>
      <dc:date>2021-10-26T12:30:30Z</dc:date>
    </item>
    <item>
      <title>Re: vla-put-tagstring problem</title>
      <link>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/vla-put-tagstring-problem/m-p/10714427#M53680</link>
      <description>&lt;P&gt;Hello John&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Yep, was almost ... &lt;span class="lia-unicode-emoji" title=":dizzy_face:"&gt;😵&lt;/span&gt;&lt;span class="lia-unicode-emoji" title=":pouting_face:"&gt;😡&lt;/span&gt;&lt;/P&gt;&lt;P&gt;but &lt;STRONG&gt;kpblc2000&lt;/STRONG&gt; gave the solution &lt;span class="lia-unicode-emoji" title=":grinning_face_with_smiling_eyes:"&gt;😄&lt;/span&gt;&lt;/P&gt;&lt;P&gt;(command "&lt;STRONG&gt;_.attsync&lt;/STRONG&gt;" "_name" (vla-get-Name blockobj))&lt;/P&gt;&lt;P&gt;&lt;a href="https://forums.autodesk.com/t5/user/viewprofilepage/user-id/252430"&gt;@kpblc2000&lt;/a&gt;: THANK YOU VERY MUCH !&lt;/P&gt;&lt;P&gt;I knew I was overlooking the obvious, Thanks for following up&lt;/P&gt;&lt;P&gt;Patrick&lt;/P&gt;</description>
      <pubDate>Tue, 26 Oct 2021 13:11:12 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/vla-put-tagstring-problem/m-p/10714427#M53680</guid>
      <dc:creator>Patrick.De.Neef</dc:creator>
      <dc:date>2021-10-26T13:11:12Z</dc:date>
    </item>
    <item>
      <title>Re: vla-put-tagstring problem</title>
      <link>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/vla-put-tagstring-problem/m-p/10714536#M53681</link>
      <description>YAY!! ☺</description>
      <pubDate>Tue, 26 Oct 2021 13:51:02 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/vla-put-tagstring-problem/m-p/10714536#M53681</guid>
      <dc:creator>john.uhden</dc:creator>
      <dc:date>2021-10-26T13:51:02Z</dc:date>
    </item>
  </channel>
</rss>

