<?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: Quick and Dirty in AutoCAD Forum</title>
    <link>https://forums.autodesk.com/t5/autocad-forum/couting-dynamic-blocks/m-p/7313647#M214050</link>
    <description>&lt;P&gt;This routine doesn't seem to work.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I get the following message after using appload with your routine&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Command: APPLOAD&lt;BR /&gt;dbcount.lsp successfully loaded.&lt;BR /&gt;Command: malformed list on input&lt;BR /&gt;Command:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;See attached screenshots&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I have also run another lisp which counts dynamic blocks but only their visibility states not lookup states.&lt;/P&gt;
&lt;P&gt;This lisp uses the same command name as your lisp ie dbcount.&lt;/P&gt;
&lt;P&gt;Not being a lisper I don't know whether that has anything to do with it.&lt;/P&gt;
&lt;P&gt;Looking at the message I don't think so, but am not really sure&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Michael Kovacik&lt;BR /&gt;AutoCAD 2d &amp;amp; 3d (29 yrs)&amp;amp; Inventor (7 yrs) &lt;BR /&gt;Manufacturing (30 yrs) Draughtsman/Designer&lt;BR /&gt;Autodesk Product Design Suite Ultimate 2018&lt;BR /&gt;Johannesburg, South Africa&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Sun, 20 Aug 2017 06:34:44 GMT</pubDate>
    <dc:creator>MikeKovacik4928</dc:creator>
    <dc:date>2017-08-20T06:34:44Z</dc:date>
    <item>
      <title>Couting Dynamic Blocks</title>
      <link>https://forums.autodesk.com/t5/autocad-forum/couting-dynamic-blocks/m-p/7312907#M214047</link>
      <description>&lt;P&gt;I would like to post this as a separate question. It was solved as part of another post, which was "annotation on attributes in blocks".&lt;/P&gt;
&lt;P&gt;The main question still hasn't been solved, but this side issue was solved by John Vellek.&lt;/P&gt;
&lt;P&gt;John, if you could post you answer here, I would like to close this issue with an "accept as solution"&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Solution for my case&amp;nbsp;was&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Use the dataextraction command (this counts lookup and visibility states)&lt;/P&gt;
&lt;P&gt;another suggested solution, which didn't work for my case,&amp;nbsp;was using the DBcount lisp routine (this only counts visibility states)&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Michael Kovacik&lt;BR /&gt;AutoCAD 2d &amp;amp; 3d (29 yrs)&amp;amp; Inventor (7 yrs) &lt;BR /&gt;Manufacturing (30 yrs) Draughtsman/Designer&lt;BR /&gt;Autodesk Product Design Suite Ultimate 2018&lt;BR /&gt;Johannesburg, South Africa&lt;/P&gt;</description>
      <pubDate>Sat, 19 Aug 2017 08:34:59 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/autocad-forum/couting-dynamic-blocks/m-p/7312907#M214047</guid>
      <dc:creator>MikeKovacik4928</dc:creator>
      <dc:date>2017-08-19T08:34:59Z</dc:date>
    </item>
    <item>
      <title>Re: Couting Dynamic Blocks</title>
      <link>https://forums.autodesk.com/t5/autocad-forum/couting-dynamic-blocks/m-p/7313219#M214048</link>
      <description>&lt;P&gt;HI&amp;nbsp;&lt;A href="https://forums.autodesk.com/t5/user/viewprofilepage/user-id/429307" target="_blank"&gt;@MikeKovacik4928&lt;/A&gt;,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Just to add my two cents (which is frequently only worth one cent) I like to use data extraction to count the dynamic blocks. It will even let you count and sort by Visibility states.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;SPAN style="color: #808000;"&gt;Please select the &lt;STRONG&gt;Accept as Solution&lt;/STRONG&gt; button if my post solves your issue or answers your question.&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Sat, 19 Aug 2017 15:57:38 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/autocad-forum/couting-dynamic-blocks/m-p/7313219#M214048</guid>
      <dc:creator>john.vellek</dc:creator>
      <dc:date>2017-08-19T15:57:38Z</dc:date>
    </item>
    <item>
      <title>Quick and Dirty</title>
      <link>https://forums.autodesk.com/t5/autocad-forum/couting-dynamic-blocks/m-p/7313282#M214049</link>
      <description>&lt;P&gt;&lt;SPAN&gt;&lt;SPAN&gt;Try this...&lt;/SPAN&gt;&lt;/SPAN&gt;&amp;nbsp;(press F2 to display results)&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;(defun c:dbcount ( / blks n blk bL bL+)

    (vl-load-com)

    (if (setq blks (ssget "_X" '((0 . "INSERT"))))
        (progn
            (repeat (setq n (sslength blks))
                (if (eq :vlax-true (vla-get-isdynamicblock (setq blk (vlax-ename-&amp;gt;vla-object (ssname blks (setq n (1- n)))))))
                    (setq bL (acad_strlsort (cons (vla-get-effectivename blk) bL)))
                )
            )
            (setq bL (reverse bL))
            (while bL
                (if bL+
                    (setq bL+ (cons (cons (car bL) (length (vl-remove-if-not '(lambda (b) (eq b (car bL))) bL))) bL+))
                    (setq bL+ (list (cons (car bL) (length (vl-remove-if-not '(lambda (b) (eq b (car bL))) bL)))))
                )
                (setq bL (vl-remove-if '(lambda (b) (eq b (car bL))) bL))
            )
            (princ "\n&amp;nbsp;") (princ "\n&amp;nbsp;")
            (foreach x bL+
                (princ (strcat "\n  " (itoa (cdr x)) "  Dynamic Block: " (car x) ))
            )
        )
    )
    (princ)
)&lt;/PRE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Sat, 19 Aug 2017 17:25:39 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/autocad-forum/couting-dynamic-blocks/m-p/7313282#M214049</guid>
      <dc:creator>gpcattaneo</dc:creator>
      <dc:date>2017-08-19T17:25:39Z</dc:date>
    </item>
    <item>
      <title>Re: Quick and Dirty</title>
      <link>https://forums.autodesk.com/t5/autocad-forum/couting-dynamic-blocks/m-p/7313647#M214050</link>
      <description>&lt;P&gt;This routine doesn't seem to work.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I get the following message after using appload with your routine&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Command: APPLOAD&lt;BR /&gt;dbcount.lsp successfully loaded.&lt;BR /&gt;Command: malformed list on input&lt;BR /&gt;Command:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;See attached screenshots&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I have also run another lisp which counts dynamic blocks but only their visibility states not lookup states.&lt;/P&gt;
&lt;P&gt;This lisp uses the same command name as your lisp ie dbcount.&lt;/P&gt;
&lt;P&gt;Not being a lisper I don't know whether that has anything to do with it.&lt;/P&gt;
&lt;P&gt;Looking at the message I don't think so, but am not really sure&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Michael Kovacik&lt;BR /&gt;AutoCAD 2d &amp;amp; 3d (29 yrs)&amp;amp; Inventor (7 yrs) &lt;BR /&gt;Manufacturing (30 yrs) Draughtsman/Designer&lt;BR /&gt;Autodesk Product Design Suite Ultimate 2018&lt;BR /&gt;Johannesburg, South Africa&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Sun, 20 Aug 2017 06:34:44 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/autocad-forum/couting-dynamic-blocks/m-p/7313647#M214050</guid>
      <dc:creator>MikeKovacik4928</dc:creator>
      <dc:date>2017-08-20T06:34:44Z</dc:date>
    </item>
    <item>
      <title>Re: Couting Dynamic Blocks</title>
      <link>https://forums.autodesk.com/t5/autocad-forum/couting-dynamic-blocks/m-p/7313712#M214051</link>
      <description>&lt;P&gt;Work fine for me, try&amp;nbsp;attached (renamed) file.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Sun, 20 Aug 2017 08:43:24 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/autocad-forum/couting-dynamic-blocks/m-p/7313712#M214051</guid>
      <dc:creator>gpcattaneo</dc:creator>
      <dc:date>2017-08-20T08:43:24Z</dc:date>
    </item>
    <item>
      <title>Re: Couting Dynamic Blocks</title>
      <link>https://forums.autodesk.com/t5/autocad-forum/couting-dynamic-blocks/m-p/7313740#M214052</link>
      <description>&lt;P&gt;okay&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;it works now (see 05 &amp;amp; 07)&lt;/P&gt;
&lt;P&gt;Still doesn't do what I want it to do.(see 06)&lt;/P&gt;
&lt;P&gt;Doesn't count the lookup states or visibility states&lt;/P&gt;
&lt;P&gt;Dataextract is still the way to go for me (see 06)&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Mike&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Sun, 20 Aug 2017 09:15:17 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/autocad-forum/couting-dynamic-blocks/m-p/7313740#M214052</guid>
      <dc:creator>MikeKovacik4928</dc:creator>
      <dc:date>2017-08-20T09:15:17Z</dc:date>
    </item>
  </channel>
</rss>

