<?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: Lisp Table in Visual LISP, AutoLISP and General Customization Forum</title>
    <link>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/lisp-table/m-p/7822698#M107917</link>
    <description>&lt;PRE&gt;(defun c:listBlock (/ ss name block blocks insPt table row)
  (vl-load-com)
  (or *acdoc*
      (setq *acdoc* (vla-get-ActiveDocument (vlax-get-acad-object)))
  )
  (or *blocks*
      (setq *blocks* (vla-get-Blocks *acdoc*))
  )

  ;; Select blocks
  (prompt "\nSelect blocks to list or &amp;lt;All&amp;gt;")
  (or (setq ss (ssget '((0 . "INSERT"))))
      (setq ss (ssget "_X" '((0 . "INSERT")))
      )
  )
  (if ss
    (progn

      ;; Build a list of dotted pairs (blockName . numberOfReferences) from the selection set
      (vlax-for	x (setq ss (vla-get-ActiveSelectionSet *acdoc*))
	(if (not (vlax-property-available-p x 'Path))
	  (setq	name   (vla-get-EffectiveName x)
		blocks (if (setq block (assoc name blocks))
			 (subst (cons name (1+ (cdr block))) block blocks)
			 (cons (cons name 1) blocks)
		       )
	  )
	)
      )
      (vla-delete ss)

      ;; Prompt for inserrtion point
      (initget 1)
      (setq insPt (trans (getpoint "\nInsertion point: ") 1 0))

      ;; Create the table
      (setq table (vla-addtable
		    (vla-get-modelspace *acdoc*)
		    (vlax-3d-point insPt)
		    (+ 2 (length blocks)) ; number of rows (including title and header)
		    3			; number of colums
		    20			; cell height
		    80			; row width
		  )
      )
      (vla-put-VertCellMargin table 4.0)
      (vla-put-TitleSuppressed table :vlax-false)
      (vla-put-HeaderSuppressed table :vlax-false)

      ;; Fill the titel and the header
      (vla-setText table 0 0 "Blocks")
      (vla-setText table 1 0 "Name")
      (vla-setText table 1 1 "Count")
      (vla-setText table 1 2 "Symbol")

      ;; fill the following rows from the list contents
      (setq row 2)
      (foreach item blocks
	(vla-settext table row 0 (car item)) ; block name
	(vla-settext table row 1 (cdr item)) ; references count
	(vla-SetBlockTableRecordId	; block symbol
	  table
	  row
	  2
	  (vla-get-ObjectId (vla-Item *blocks* (car item)))
	  :vlax-true
	)
	(setq row (1+ row))
      )
    )
  )
  (princ)
)&lt;/PRE&gt;
&lt;P&gt;But, if you're not able to understand such code, maybe you should learn the AutoLISP basics before trying to achieve such task.&lt;/P&gt;
&lt;P&gt;We all have to learn how to walk before trying to run...&lt;/P&gt;</description>
    <pubDate>Fri, 02 Mar 2018 14:50:32 GMT</pubDate>
    <dc:creator>_gile</dc:creator>
    <dc:date>2018-03-02T14:50:32Z</dc:date>
    <item>
      <title>Lisp Table</title>
      <link>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/lisp-table/m-p/7821821#M107903</link>
      <description>&lt;P&gt;&amp;nbsp;Is there a way I can make a table with values in there using lisp?&lt;/P&gt;&lt;P&gt;Thanks&lt;/P&gt;</description>
      <pubDate>Fri, 02 Mar 2018 08:35:35 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/lisp-table/m-p/7821821#M107903</guid>
      <dc:creator>Lex_van_Ham</dc:creator>
      <dc:date>2018-03-02T08:35:35Z</dc:date>
    </item>
    <item>
      <title>Re: Lisp Table</title>
      <link>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/lisp-table/m-p/7821854#M107904</link>
      <description>&lt;P&gt;Yes, you can. Many examples can be found in this forum or other forums.&lt;/P&gt;&lt;P&gt;Check the thread below for one of those many examples; my code creates a table with information collected from the drawing in this case.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;A href="https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/lisp-request-block-count-inside-a-closed-polyline/td-p/7665364/page/3" target="_blank"&gt;https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/lisp-request-block-count-inside-a-closed-polyline/td-p/7665364/page/3&lt;/A&gt;&lt;/P&gt;</description>
      <pubDate>Fri, 02 Mar 2018 08:48:08 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/lisp-table/m-p/7821854#M107904</guid>
      <dc:creator>DannyNL</dc:creator>
      <dc:date>2018-03-02T08:48:08Z</dc:date>
    </item>
    <item>
      <title>Re: Lisp Table</title>
      <link>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/lisp-table/m-p/7821861#M107905</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;You can use the ActiveX &lt;A href="http://help.autodesk.com/view/OARX/2018/ENU/?guid=GUID-A5A767A8-98D0-40B4-89D1-1F0E5AC52EB7" target="_blank"&gt;&lt;STRONG&gt;vla-AddTable&lt;/STRONG&gt;&lt;/A&gt; function to create the table and the use the &lt;A href="http://help.autodesk.com/view/OARX/2018/ENU/?guid=GUID-7B82400C-53D0-4D1A-94FA-66BB3040F0AA" target="_blank"&gt;&lt;STRONG&gt;Table&lt;/STRONG&gt;&lt;/A&gt; object methods and properties&lt;/P&gt;</description>
      <pubDate>Fri, 02 Mar 2018 08:49:48 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/lisp-table/m-p/7821861#M107905</guid>
      <dc:creator>_gile</dc:creator>
      <dc:date>2018-03-02T08:49:48Z</dc:date>
    </item>
    <item>
      <title>Re: Lisp Table</title>
      <link>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/lisp-table/m-p/7822037#M107906</link>
      <description>&lt;P&gt;Im not sure if its included in your last reply (probably is but i can't find/don't understand it) but how would i use the same lisp script to put text/number/other stuff into the cells like a-2 = 10 or something.&lt;/P&gt;</description>
      <pubDate>Fri, 02 Mar 2018 10:29:21 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/lisp-table/m-p/7822037#M107906</guid>
      <dc:creator>Lex_van_Ham</dc:creator>
      <dc:date>2018-03-02T10:29:21Z</dc:date>
    </item>
    <item>
      <title>Re: Lisp Table</title>
      <link>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/lisp-table/m-p/7822059#M107907</link>
      <description>&lt;P&gt;Well, tables are not that simple to handle that after couple of days of learning LISP. Rather post your idea what it should look like and we may help you to make that happen.&lt;/P&gt;</description>
      <pubDate>Fri, 02 Mar 2018 10:46:23 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/lisp-table/m-p/7822059#M107907</guid>
      <dc:creator>ВeekeeCZ</dc:creator>
      <dc:date>2018-03-02T10:46:23Z</dc:date>
    </item>
    <item>
      <title>Re: Lisp Table</title>
      <link>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/lisp-table/m-p/7822089#M107908</link>
      <description>&lt;P&gt;Oke so:&lt;/P&gt;&lt;P&gt;I want a table with 2 columns 28 rows with in the top row the table name&lt;/P&gt;&lt;P&gt;Below that the names of the columns&amp;nbsp;&lt;/P&gt;&lt;P&gt;All the rows below that Column 1 will always have the same name with exeption for row 5 and 6 They will be like:&lt;/P&gt;&lt;P&gt;(cond&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;(.....)&lt;/P&gt;&lt;P&gt;&amp;nbsp; &amp;nbsp; (Different product&lt;/P&gt;&lt;P&gt;&amp;nbsp;(.....)&amp;nbsp;&lt;/P&gt;&lt;P&gt;and so on.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Column 2 will be the amount of items based on calculations from my last script.&lt;/P&gt;&lt;P&gt;Example:&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Table.PNG" style="width: 678px;"&gt;&lt;img src="https://forums.autodesk.com/t5/image/serverpage/image-id/469960i8967484452F2CFFD/image-size/large?v=v2&amp;amp;px=999" role="button" title="Table.PNG" alt="Table.PNG" /&gt;&lt;/span&gt;&lt;/P&gt;</description>
      <pubDate>Fri, 02 Mar 2018 10:59:40 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/lisp-table/m-p/7822089#M107908</guid>
      <dc:creator>Lex_van_Ham</dc:creator>
      <dc:date>2018-03-02T10:59:40Z</dc:date>
    </item>
    <item>
      <title>Re: Lisp Table</title>
      <link>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/lisp-table/m-p/7822126#M107909</link>
      <description>&lt;P&gt;Here's an example from which you should get som inspiration.&lt;/P&gt;
&lt;P&gt;It creates a table to list the selected block references.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;(defun c:listBlock (/ ss name ref refs insPt table row)
  (vl-load-com)
  (or *acdoc*
      (setq *acdoc* (vla-get-ActiveDocument (vlax-get-acad-object)))
  )
  (or *blocks*
      (setq *blocks* (vla-get-Blocks *acdoc*))
  )
  (prompt "\nSelect blocks to list or &amp;lt;All&amp;gt;")
  (or (setq ss (ssget '((0 . "INSERT"))))
      (setq ss (ssget "_X" '((0 . "INSERT")))
      )
  )
  (if ss
    (progn
      (vlax-for	x (setq ss (vla-get-ActiveSelectionSet *acdoc*))
	(if (not (vlax-property-available-p x 'Path))
	  (setq	name (vla-get-EffectiveName x)
		refs (if (setq ref (assoc name refs))
		       (subst (cons name (1+ (cdr ref))) ref refs)
		       (cons (cons name 1) refs)
		     )
	  )
	)
      )
      (vla-delete ss)
      (initget 1)
      (setq insPt (trans (getpoint "\nInsertion point: ") 1 0))
      (setq table (vla-addtable
		    (vla-get-modelspace *acdoc*)
		    (vlax-3d-point insPt)
		    (+ 2 (length refs))	; number of rows (including title and header)
		    3			; number of colums
		    20			; cell height
		    80			; row width
		  )
      )
      (vla-put-VertCellMargin table 4.0)
      (vla-put-TitleSuppressed table :vlax-false)
      (vla-put-HeaderSuppressed table :vlax-false)
      (vla-setText table 0 0 "Blocks")
      (vla-setText table 1 0 "Name")
      (vla-setText table 1 1 "Count")
      (vla-setText table 1 2 "Symbol")
      (setq row 2)
      (foreach item refs
	(vla-settext table row 0 (car item))
	(vla-settext table row 1 (cdr item))
	(vla-SetBlockTableRecordId
	  table
	  row
	  2
	  (vla-get-ObjectId (vla-Item *blocks* (car item)))
	  :vlax-true
	)
	(setq row (1+ row))
      )
    )
  )
  (princ)
)&lt;/PRE&gt;</description>
      <pubDate>Fri, 02 Mar 2018 11:22:35 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/lisp-table/m-p/7822126#M107909</guid>
      <dc:creator>_gile</dc:creator>
      <dc:date>2018-03-02T11:22:35Z</dc:date>
    </item>
    <item>
      <title>Re: Lisp Table</title>
      <link>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/lisp-table/m-p/7822147#M107910</link>
      <description>&lt;P&gt;Lets start from the beginning. Are you able to build a list of values for your table? It should look like this:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;'(("name1" "amount1")
  ("name2" "amount2")
  ("name3" "amount3")
  ("name4" "amount4")
  ...
  ("name16" "amount16")
  )&lt;/PRE&gt;</description>
      <pubDate>Fri, 02 Mar 2018 11:30:12 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/lisp-table/m-p/7822147#M107910</guid>
      <dc:creator>ВeekeeCZ</dc:creator>
      <dc:date>2018-03-02T11:30:12Z</dc:date>
    </item>
    <item>
      <title>Re: Lisp Table</title>
      <link>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/lisp-table/m-p/7822242#M107911</link>
      <description>&lt;P&gt;And looking at your example table.......what are you exactly counting?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;If you are counting blocks in the current drawing or in a set of drawings, this might be easily solved by using the Extract Data tools (Ribbon Insert-&amp;gt; Panel Linking &amp;amp; Extraction --&amp;gt; Extract Data) as this will be able to count and automatically create a table for you.&lt;/P&gt;</description>
      <pubDate>Fri, 02 Mar 2018 12:08:43 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/lisp-table/m-p/7822242#M107911</guid>
      <dc:creator>DannyNL</dc:creator>
      <dc:date>2018-03-02T12:08:43Z</dc:date>
    </item>
    <item>
      <title>Re: Lisp Table</title>
      <link>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/lisp-table/m-p/7822250#M107912</link>
      <description>&lt;PRE&gt;Like this?
If you mean replace the name of "name1" to what ever it will be when done ill do that when I got the entire thing working.
'(("name1" "amount1")
  ("name2" "amount2")
  ("name3" "amount3")
  ("name4" "amount4")
  ("name5" "amount5")
  ("name6" "amount6")
  ("name7" "amount7")
  ("name8" "amount8")
  ("name9" "amount9")
  ("name10" "amount10")
  ("name11" "amount11")
  ("name12" "amount12")
  ("name13" "amount13")
  ("name14" "amount14")
  ("name15" "amount15")
  ("name16" "amount16")
  ("name17" "amount17")
  ("name18" "amount18")
  ("name19" "amount19")
  ("name20" "amount20")
  ("name21" "amount21")
  ("name22" "amount22")
  ("name23" "amount23")
  ("name24" "amount24")
  ("name25" "amount25")
  ("name26" "amount26")&lt;/PRE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 02 Mar 2018 12:12:51 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/lisp-table/m-p/7822250#M107912</guid>
      <dc:creator>Lex_van_Ham</dc:creator>
      <dc:date>2018-03-02T12:12:51Z</dc:date>
    </item>
    <item>
      <title>Re: Lisp Table</title>
      <link>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/lisp-table/m-p/7822257#M107913</link>
      <description>&lt;P&gt;I made a script that creates a drawing with blocks, counting the blocks can be done with that script but then i have other parts where the amount of them is defined by values from the script .&lt;/P&gt;&lt;P&gt;(example W / 10 * H)&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 02 Mar 2018 12:15:30 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/lisp-table/m-p/7822257#M107913</guid>
      <dc:creator>Lex_van_Ham</dc:creator>
      <dc:date>2018-03-02T12:15:30Z</dc:date>
    </item>
    <item>
      <title>Re: Lisp Table</title>
      <link>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/lisp-table/m-p/7822298#M107914</link>
      <description>&lt;P&gt;I think I can make it now&amp;nbsp;&lt;img id="smileyhappy" class="emoticon emoticon-smileyhappy" src="https://forums.autodesk.com/i/smilies/16x16_smiley-happy.png" alt="Smiley Happy" title="Smiley Happy" /&gt;&lt;/P&gt;&lt;P&gt;Not sure yet but it feels good&amp;nbsp;&lt;img id="smileytongue" class="emoticon emoticon-smileytongue" src="https://forums.autodesk.com/i/smilies/16x16_smiley-tongue.png" alt="Smiley Tongue" title="Smiley Tongue" /&gt;&lt;/P&gt;</description>
      <pubDate>Fri, 02 Mar 2018 12:32:30 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/lisp-table/m-p/7822298#M107914</guid>
      <dc:creator>Lex_van_Ham</dc:creator>
      <dc:date>2018-03-02T12:32:30Z</dc:date>
    </item>
    <item>
      <title>Re: Lisp Table</title>
      <link>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/lisp-table/m-p/7822369#M107915</link>
      <description>&lt;P&gt;Well, get your list the way fits you best.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Anyway, what&amp;nbsp;I've meant was "build a list" - meaning the process that creates a list. If you're feeling lucky to make it by yourself, consider the following as a spoiler.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;&lt;FONT color="#FFFFFF"&gt;(defun c:ListBuilding (/ lst)
  (setq i 0)
  (repeat 16
    (setq lst (cons (list (strcat "name" (itoa (setq i (1+ i)))) (strcat "amount" (itoa i))) lst)))
  (reverse lst)
  )&lt;/FONT&gt;&lt;/PRE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 02 Mar 2018 12:59:12 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/lisp-table/m-p/7822369#M107915</guid>
      <dc:creator>ВeekeeCZ</dc:creator>
      <dc:date>2018-03-02T12:59:12Z</dc:date>
    </item>
    <item>
      <title>Re: Lisp Table</title>
      <link>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/lisp-table/m-p/7822503#M107916</link>
      <description>&lt;PRE&gt;(defun c:listBlock (/ ss name ref refs insPt table row)
  (vl-load-com)
  (or *acdoc*
      (setq *acdoc* (vla-get-ActiveDocument (vlax-get-acad-object)))
  )
  (or *blocks*
      (setq *blocks* (vla-get-Blocks *acdoc*))
  )
  (prompt "\nSelect blocks to list or &amp;lt;All&amp;gt;")
  (or (setq ss (ssget '((0 . "INSERT"))))
      (setq ss (ssget "_X" '((0 . "INSERT")))
      )
  )
  (if ss
    (progn
      (vlax-for	x (setq ss (vla-get-ActiveSelectionSet *acdoc*))
	(if (not (vlax-property-available-p x 'Path))
	  (setq	name (vla-get-EffectiveName x)
		refs (if (setq ref (assoc name refs))
		       (subst (cons name (1+ (cdr ref))) ref refs)
		       (cons (cons name 1) refs)
		     )
	  )
	)
      )
      (vla-delete ss)
      (initget 1)
      (setq insPt (trans (getpoint "\nInsertion point: ") 1 0))
      (setq table (vla-addtable
		    (vla-get-modelspace *acdoc*)
		    (vlax-3d-point insPt)
		    (+ 2 (length refs))	; number of rows (including title and header)
		    3			; number of colums
		    20			; cell height
		    80			; row width
		  )
      )
      (vla-put-VertCellMargin table 4.0)
      (vla-put-TitleSuppressed table :vlax-false)
      (vla-put-HeaderSuppressed table :vlax-false)
      (vla-setText table 0 0 "Blocks")
      (vla-setText table 1 0 "Name")
      (vla-setText table 1 1 "Count")
      (vla-setText table 1 2 "Symbol")
      (setq row 2)
      (foreach item refs
	(vla-settext table row 0 (car item))
	(vla-settext table row 1 (cdr item))
	(vla-SetBlockTableRecordId
	  table
	  row
	  2
	  (vla-get-ObjectId (vla-Item *blocks* (car item)))
	  :vlax-true
	)
	(setq row (1+ row))
      )
    )
  )
  (princ)
)&lt;/PRE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Can I please get a bit more explanation on which part of this code does what so I can better modify it to work the way I want?&lt;/P&gt;</description>
      <pubDate>Fri, 02 Mar 2018 13:48:12 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/lisp-table/m-p/7822503#M107916</guid>
      <dc:creator>Lex_van_Ham</dc:creator>
      <dc:date>2018-03-02T13:48:12Z</dc:date>
    </item>
    <item>
      <title>Re: Lisp Table</title>
      <link>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/lisp-table/m-p/7822698#M107917</link>
      <description>&lt;PRE&gt;(defun c:listBlock (/ ss name block blocks insPt table row)
  (vl-load-com)
  (or *acdoc*
      (setq *acdoc* (vla-get-ActiveDocument (vlax-get-acad-object)))
  )
  (or *blocks*
      (setq *blocks* (vla-get-Blocks *acdoc*))
  )

  ;; Select blocks
  (prompt "\nSelect blocks to list or &amp;lt;All&amp;gt;")
  (or (setq ss (ssget '((0 . "INSERT"))))
      (setq ss (ssget "_X" '((0 . "INSERT")))
      )
  )
  (if ss
    (progn

      ;; Build a list of dotted pairs (blockName . numberOfReferences) from the selection set
      (vlax-for	x (setq ss (vla-get-ActiveSelectionSet *acdoc*))
	(if (not (vlax-property-available-p x 'Path))
	  (setq	name   (vla-get-EffectiveName x)
		blocks (if (setq block (assoc name blocks))
			 (subst (cons name (1+ (cdr block))) block blocks)
			 (cons (cons name 1) blocks)
		       )
	  )
	)
      )
      (vla-delete ss)

      ;; Prompt for inserrtion point
      (initget 1)
      (setq insPt (trans (getpoint "\nInsertion point: ") 1 0))

      ;; Create the table
      (setq table (vla-addtable
		    (vla-get-modelspace *acdoc*)
		    (vlax-3d-point insPt)
		    (+ 2 (length blocks)) ; number of rows (including title and header)
		    3			; number of colums
		    20			; cell height
		    80			; row width
		  )
      )
      (vla-put-VertCellMargin table 4.0)
      (vla-put-TitleSuppressed table :vlax-false)
      (vla-put-HeaderSuppressed table :vlax-false)

      ;; Fill the titel and the header
      (vla-setText table 0 0 "Blocks")
      (vla-setText table 1 0 "Name")
      (vla-setText table 1 1 "Count")
      (vla-setText table 1 2 "Symbol")

      ;; fill the following rows from the list contents
      (setq row 2)
      (foreach item blocks
	(vla-settext table row 0 (car item)) ; block name
	(vla-settext table row 1 (cdr item)) ; references count
	(vla-SetBlockTableRecordId	; block symbol
	  table
	  row
	  2
	  (vla-get-ObjectId (vla-Item *blocks* (car item)))
	  :vlax-true
	)
	(setq row (1+ row))
      )
    )
  )
  (princ)
)&lt;/PRE&gt;
&lt;P&gt;But, if you're not able to understand such code, maybe you should learn the AutoLISP basics before trying to achieve such task.&lt;/P&gt;
&lt;P&gt;We all have to learn how to walk before trying to run...&lt;/P&gt;</description>
      <pubDate>Fri, 02 Mar 2018 14:50:32 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/lisp-table/m-p/7822698#M107917</guid>
      <dc:creator>_gile</dc:creator>
      <dc:date>2018-03-02T14:50:32Z</dc:date>
    </item>
    <item>
      <title>Re: Lisp Table</title>
      <link>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/lisp-table/m-p/7825001#M107918</link>
      <description>&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Hello &lt;a href="https://forums.autodesk.com/t5/user/viewprofilepage/user-id/109424"&gt;@_gile&lt;/a&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Beautiful Routine !&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Please is it possible to have a Micro-Micro-Improvment ?&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;On the command/text Windows : the total of the Blocks ...&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Thanks in advance, Regards, Patrice&lt;/P&gt;</description>
      <pubDate>Sat, 03 Mar 2018 21:14:41 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/lisp-table/m-p/7825001#M107918</guid>
      <dc:creator>braudpat</dc:creator>
      <dc:date>2018-03-03T21:14:41Z</dc:date>
    </item>
    <item>
      <title>Re: Lisp Table</title>
      <link>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/lisp-table/m-p/7969048#M107919</link>
      <description>&lt;P&gt;&lt;a href="https://forums.autodesk.com/t5/user/viewprofilepage/user-id/109424"&gt;@_gile&lt;/a&gt;&lt;/P&gt;&lt;P&gt;Thank for excellence code.&lt;/P&gt;&lt;P&gt;If I don't need 1 st row(Header row), only required the title of row and below data how can do that.&lt;/P&gt;&lt;P&gt;(see attached screenshot)&lt;/P&gt;</description>
      <pubDate>Mon, 30 Apr 2018 09:13:59 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/lisp-table/m-p/7969048#M107919</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2018-04-30T09:13:59Z</dc:date>
    </item>
    <item>
      <title>Re: Lisp Table</title>
      <link>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/lisp-table/m-p/7971947#M107920</link>
      <description>&lt;BLOCKQUOTE&gt;&lt;HR /&gt;@Anonymous a écrit&amp;nbsp;:&lt;BR /&gt;
&lt;P&gt;&lt;a href="https://forums.autodesk.com/t5/user/viewprofilepage/user-id/109424"&gt;@_gile&lt;/a&gt;&lt;/P&gt;
&lt;P&gt;Thank for excellence code.&lt;/P&gt;
&lt;P&gt;If I don't need 1 st row(Header row), only required the title of row and below data how can do that.&lt;/P&gt;
&lt;P&gt;(see attached screenshot)&lt;/P&gt;
&lt;HR /&gt;&lt;/BLOCKQUOTE&gt;
&lt;P&gt;You should have been able to do it by yourself (look at the commented red lines).&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;(defun c:listBlock (/ ss name block blocks insPt table row)
  (vl-load-com)
  (or *acdoc*
      (setq *acdoc* (vla-get-ActiveDocument (vlax-get-acad-object)))
  )
  (or *blocks*
      (setq *blocks* (vla-get-Blocks *acdoc*))
  )

  ;; Select blocks
  (prompt "\nSelect blocks to list or &amp;lt;All&amp;gt;")
  (or (setq ss (ssget '((0 . "INSERT"))))
      (setq ss (ssget "_X" '((0 . "INSERT")))
      )
  )
  (if ss
    (progn

      ;; Build a list of dotted pairs (blockName . numberOfReferences) from the selection set
      (vlax-for	x (setq ss (vla-get-ActiveSelectionSet *acdoc*))
	(if (not (vlax-property-available-p x 'Path))
	  (setq	name   (vla-get-EffectiveName x)
		blocks (if (setq block (assoc name blocks))
			 (subst (cons name (1+ (cdr block))) block blocks)
			 (cons (cons name 1) blocks)
		       )
	  )
	)
      )
      (vla-delete ss)

      ;; Prompt for inserrtion point
      (initget 1)
      (setq insPt (trans (getpoint "\nInsertion point: ") 1 0))

      ;; Create the table
      (setq table (vla-addtable
		    (vla-get-modelspace *acdoc*)
		    (vlax-3d-point insPt)
		    &lt;FONT color="#FF0000"&gt;;(+ 2 (length blocks)) ; number of rows (including title and header)&lt;/FONT&gt;
		    &lt;FONT color="#000000"&gt;(+ &lt;FONT color="#339966"&gt;1&lt;/FONT&gt; (length blocks)) ; number of rows (including header)&lt;/FONT&gt;
		    3			; number of colums
		    20			; cell height
		    80			; row width
		  )
      )
      (vla-put-VertCellMargin table 4.0)
      &lt;FONT color="#FF0000"&gt;;(vla-put-TitleSuppressed table :vlax-false)&lt;/FONT&gt;
      (vla-put-TitleSuppressed table &lt;FONT color="#339966"&gt;:vlax-true&lt;/FONT&gt;)
      (vla-put-HeaderSuppressed table :vlax-false)

      &lt;FONT color="#FF0000"&gt;;; Fill the title and the header
      ;(vla-setText table 0 0 "Blocks")
      ;(vla-setText table 1 0 "Name")
      ;(vla-setText table 1 1 "Count")
      ;(vla-setText table 1 2 "Symbol")&lt;/FONT&gt;
      ;; Fill the header
      (vla-setText table &lt;FONT color="#339966"&gt;0&lt;/FONT&gt; 0 "Name")
      (vla-setText table &lt;FONT color="#339966"&gt;0&lt;/FONT&gt; 1 "Count")
      (vla-setText table &lt;FONT color="#339966"&gt;0&lt;/FONT&gt; 2 "Symbol")

      ;; fill the following rows from the list contents
      &lt;FONT color="#FF0000"&gt;;(setq row 2)&lt;/FONT&gt;
      (setq row &lt;FONT color="#339966"&gt;1&lt;/FONT&gt;)
      (foreach item blocks
	(vla-settext table row 0 (car item)) ; block name
	(vla-settext table row 1 (cdr item)) ; references count
	(vla-SetBlockTableRecordId	; block symbol
	  table
	  row
	  2
	  (vla-get-ObjectId (vla-Item *blocks* (car item)))
	  :vlax-true
	)
	(setq row (1+ row))
      )
    )
  )
  (princ)
)&lt;/PRE&gt;</description>
      <pubDate>Tue, 01 May 2018 14:19:38 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/lisp-table/m-p/7971947#M107920</guid>
      <dc:creator>_gile</dc:creator>
      <dc:date>2018-05-01T14:19:38Z</dc:date>
    </item>
    <item>
      <title>Re: Lisp Table</title>
      <link>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/lisp-table/m-p/8917817#M107921</link>
      <description>&lt;P&gt;Hello, Great Lisp!&lt;/P&gt;&lt;P&gt;I had a quick question. How is the size of the text being driven in this lisp routine? Can I Change the text Size to maybe 100? I know I was Able to change the table row sizes, but that's as far I was able to change. I tried to change my TextSize but that also did not work.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Any Comments or help would be appreciated! &lt;span class="lia-unicode-emoji" title=":grinning_face_with_big_eyes:"&gt;😃&lt;/span&gt;&lt;/P&gt;</description>
      <pubDate>Thu, 18 Jul 2019 18:47:07 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/lisp-table/m-p/8917817#M107921</guid>
      <dc:creator>jeguizaASRZM</dc:creator>
      <dc:date>2019-07-18T18:47:07Z</dc:date>
    </item>
  </channel>
</rss>

