<?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: Conditional Attribute value editor in Visual LISP, AutoLISP and General Customization Forum</title>
    <link>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/conditional-attribute-value-editor/m-p/10150816#M63103</link>
    <description>&lt;P&gt;@Anonymous,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;in case you were asking what "&lt;SPAN&gt;Error: too few arguments" means?&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;here is an example:&amp;nbsp;&lt;/SPAN&gt;&lt;SPAN&gt;(foo a b c)&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;where a,b,c are arguments to function (foo)&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;if you call (foo) with less then 3 arguments or no arguments at all, you get that error.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;here is a tip for debug:&amp;nbsp;&lt;/SPAN&gt;&lt;SPAN&gt;there is a nice helper function called (trace)&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;usage:&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;(trace foo)&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;(the argument may be a list of functions name to be traced)&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;when your program stuck with an error go back to VLIDE top menu window\trace the trace window is opened.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;you will see there the call to your trace function plus the arguments that were sent and the result of the function.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;if the error comes from this function, then you will get no result.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;oh one last more&amp;nbsp;&lt;span class="lia-unicode-emoji" title=":grinning_face:"&gt;😀&lt;/span&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;to disable a traced function use (untrace foo)&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;enjoy&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;Moshe&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Fri, 12 Mar 2021 07:40:25 GMT</pubDate>
    <dc:creator>Moshe-A</dc:creator>
    <dc:date>2021-03-12T07:40:25Z</dc:date>
    <item>
      <title>Conditional Attribute value editor</title>
      <link>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/conditional-attribute-value-editor/m-p/10148959#M63100</link>
      <description>&lt;P&gt;I'm trying to develop a lisp routine that can do the following (Conceptually it's a conditional attribute edit program):&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Search for a specific block(s) "MyBlock" and Attribute tag "Tag1" to find a given value "MyValue".&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;IF that value is found in the given block and attribute, then edit the attribute "Tag2" in "MyBlock" to a static value "MyNewValue".&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I'm getting hung up on syntac and ACAD keeps returning with Error: too few arguments.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Any help is appreciated!&lt;/P&gt;</description>
      <pubDate>Thu, 11 Mar 2021 16:46:31 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/conditional-attribute-value-editor/m-p/10148959#M63100</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2021-03-11T16:46:31Z</dc:date>
    </item>
    <item>
      <title>Re: Conditional Attribute value editor</title>
      <link>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/conditional-attribute-value-editor/m-p/10148989#M63101</link>
      <description>&lt;BLOCKQUOTE&gt;&lt;HR /&gt;@Anonymous&amp;nbsp;wrote:&lt;BR /&gt;
&lt;P&gt;&lt;STRONG&gt;&lt;FONT color="#0000FF"&gt;I'm trying to develop a lisp routine&lt;/FONT&gt; &lt;/STRONG&gt;that can do the following (Conceptually it's a conditional attribute edit program):&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;HR /&gt;&lt;/BLOCKQUOTE&gt;
&lt;P&gt;&lt;FONT size="3" color="#0000FF"&gt;A hint / guide / advise is what you're looking for YES?&lt;/FONT&gt;&lt;/P&gt;
&lt;UL&gt;
&lt;LI&gt;&lt;FONT size="3"&gt;(ssget ) use a filter for entity type [ 0 ] , block name [ 2 ] , attribute flag [ 66 ]&lt;/FONT&gt;&lt;/LI&gt;
&lt;LI&gt;&lt;FONT size="3"&gt;(entnext) to get attribute tag names [ 2 ] and value&amp;nbsp; [ 1 ]&lt;/FONT&gt;&lt;/LI&gt;
&lt;LI&gt;&lt;FONT size="3"&gt;(if .. ) or (cond..) Test for existence of both tags and value&lt;/FONT&gt;&lt;/LI&gt;
&lt;LI&gt;&lt;FONT size="3"&gt;(entmod (subst ...))(entupd ...) if evaluates to T then assign new value&lt;/FONT&gt;&lt;/LI&gt;
&lt;/UL&gt;
&lt;P&gt;&lt;FONT size="3"&gt;HTH&lt;/FONT&gt;&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, 11 Mar 2021 16:57:53 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/conditional-attribute-value-editor/m-p/10148989#M63101</guid>
      <dc:creator>pbejse</dc:creator>
      <dc:date>2021-03-11T16:57:53Z</dc:date>
    </item>
    <item>
      <title>Re: Conditional Attribute value editor</title>
      <link>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/conditional-attribute-value-editor/m-p/10150639#M63102</link>
      <description>&lt;P&gt;Following on from the Pbejse suggestions here is a VL example can use as a start for your solution.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;(foreach att (vlax-invoke (vlax-ename-&amp;gt;vla-object (ssname SS x)) 'getattributes)
        (if (and (= tag (strcase (vla-get-tagstring att)))
        (= (vla-get-textstring att) teststring)
        )
(vla-put-textstring att newstring)
)
)&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 12 Mar 2021 05:49:35 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/conditional-attribute-value-editor/m-p/10150639#M63102</guid>
      <dc:creator>Sea-Haven</dc:creator>
      <dc:date>2021-03-12T05:49:35Z</dc:date>
    </item>
    <item>
      <title>Re: Conditional Attribute value editor</title>
      <link>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/conditional-attribute-value-editor/m-p/10150816#M63103</link>
      <description>&lt;P&gt;@Anonymous,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;in case you were asking what "&lt;SPAN&gt;Error: too few arguments" means?&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;here is an example:&amp;nbsp;&lt;/SPAN&gt;&lt;SPAN&gt;(foo a b c)&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;where a,b,c are arguments to function (foo)&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;if you call (foo) with less then 3 arguments or no arguments at all, you get that error.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;here is a tip for debug:&amp;nbsp;&lt;/SPAN&gt;&lt;SPAN&gt;there is a nice helper function called (trace)&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;usage:&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;(trace foo)&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;(the argument may be a list of functions name to be traced)&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;when your program stuck with an error go back to VLIDE top menu window\trace the trace window is opened.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;you will see there the call to your trace function plus the arguments that were sent and the result of the function.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;if the error comes from this function, then you will get no result.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;oh one last more&amp;nbsp;&lt;span class="lia-unicode-emoji" title=":grinning_face:"&gt;😀&lt;/span&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;to disable a traced function use (untrace foo)&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;enjoy&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;Moshe&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 12 Mar 2021 07:40:25 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/conditional-attribute-value-editor/m-p/10150816#M63103</guid>
      <dc:creator>Moshe-A</dc:creator>
      <dc:date>2021-03-12T07:40:25Z</dc:date>
    </item>
    <item>
      <title>Re: Conditional Attribute value editor</title>
      <link>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/conditional-attribute-value-editor/m-p/10152827#M63104</link>
      <description>&lt;P&gt;&lt;a href="https://forums.autodesk.com/t5/user/viewprofilepage/user-id/52747"&gt;@Moshe-A&lt;/a&gt;&amp;nbsp; wrote,&lt;/P&gt;
&lt;P&gt;"&lt;SPAN&gt;(the argument may be a list of functions name to be traced)&lt;/SPAN&gt;"&lt;/P&gt;
&lt;P&gt;I didn't know there was a THE function.&amp;nbsp;&lt;span class="lia-unicode-emoji" title=":beaming_face_with_smiling_eyes:"&gt;😁&lt;/span&gt;&lt;/P&gt;</description>
      <pubDate>Fri, 12 Mar 2021 21:38:02 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/conditional-attribute-value-editor/m-p/10152827#M63104</guid>
      <dc:creator>john.uhden</dc:creator>
      <dc:date>2021-03-12T21:38:02Z</dc:date>
    </item>
    <item>
      <title>Re: Conditional Attribute value editor</title>
      <link>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/conditional-attribute-value-editor/m-p/10152843#M63105</link>
      <description>&lt;P&gt;That's my style, but your indentation is rather sloppy.&amp;nbsp;&lt;span class="lia-unicode-emoji" title=":smirking_face:"&gt;😏&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;BTW, how do you do parenthesis matching in NotePad++?&lt;/P&gt;</description>
      <pubDate>Fri, 12 Mar 2021 21:53:35 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/conditional-attribute-value-editor/m-p/10152843#M63105</guid>
      <dc:creator>john.uhden</dc:creator>
      <dc:date>2021-03-12T21:53:35Z</dc:date>
    </item>
    <item>
      <title>Re: Conditional Attribute value editor</title>
      <link>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/conditional-attribute-value-editor/m-p/10153429#M63106</link>
      <description>&lt;P&gt;&lt;a href="https://forums.autodesk.com/t5/user/viewprofilepage/user-id/3930636"&gt;@john.uhden&lt;/a&gt;&amp;nbsp;,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;actually it's not a list. you call (trace) with arguments ...&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="general"&gt;(trace [function ...])&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Sat, 13 Mar 2021 07:56:13 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/conditional-attribute-value-editor/m-p/10153429#M63106</guid>
      <dc:creator>Moshe-A</dc:creator>
      <dc:date>2021-03-13T07:56:13Z</dc:date>
    </item>
  </channel>
</rss>

