<?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 for creating table with selected text in Visual LISP, AutoLISP and General Customization Forum</title>
    <link>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/lisp-for-creating-table-with-selected-text/m-p/8971924#M85622</link>
    <description>&lt;P&gt;Unfortunately if you make a mistake there is no quick way to un select to put a confirm would slow it down so much.&amp;nbsp; Rather it could be add to existing table so just stop erase item, then continue on. It would need a re-work of the code. Would that be suitable ? But I would need time to do.&lt;/P&gt;</description>
    <pubDate>Sun, 18 Aug 2019 02:16:45 GMT</pubDate>
    <dc:creator>Sea-Haven</dc:creator>
    <dc:date>2019-08-18T02:16:45Z</dc:date>
    <item>
      <title>Lisp for creating table with selected text</title>
      <link>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/lisp-for-creating-table-with-selected-text/m-p/8954787#M85606</link>
      <description>&lt;P&gt;Good Day!&lt;BR /&gt;&lt;BR /&gt;I would like to know if it is possible to create a table with a selected text. Please refer to the image attached.&lt;BR /&gt;&lt;BR /&gt;Example:&lt;BR /&gt;If you select the texts "TEXT 1" , "TEXT 2", "TEXT 3", "TEXT 4", "TEXT 5", and "TEXT 6" respectively, regardless if it is rotated or not, it will transform into a table arrangement.&lt;BR /&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="REQUEST.png" style="width: 400px;"&gt;&lt;img src="https://forums.autodesk.com/t5/image/serverpage/image-id/665055i5C258A3A1B5A4214/image-size/medium?v=v2&amp;amp;px=400" role="button" title="REQUEST.png" alt="REQUEST.png" /&gt;&lt;/span&gt;&lt;/P&gt;</description>
      <pubDate>Thu, 08 Aug 2019 07:10:58 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/lisp-for-creating-table-with-selected-text/m-p/8954787#M85606</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2019-08-08T07:10:58Z</dc:date>
    </item>
    <item>
      <title>Re: Lisp for creating table with selected text</title>
      <link>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/lisp-for-creating-table-with-selected-text/m-p/8955349#M85607</link>
      <description>&lt;DIV style="font-size: 1.1em; font-family: 'Artifakt'; line-height: 1.3em; margin: 15px 100px 80px 100px;"&gt;
&lt;P&gt;Do you want the text to be inserted into a single column, in the same order that you select them (presuming you pick them one at a time). Or do you want to window the text objects and then sort them somehow? If so, how?&lt;/P&gt;
&lt;/DIV&gt;</description>
      <pubDate>Thu, 08 Aug 2019 12:24:40 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/lisp-for-creating-table-with-selected-text/m-p/8955349#M85607</guid>
      <dc:creator>rkmcswain</dc:creator>
      <dc:date>2019-08-08T12:24:40Z</dc:date>
    </item>
    <item>
      <title>Re: Lisp for creating table with selected text</title>
      <link>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/lisp-for-creating-table-with-selected-text/m-p/8955696#M85608</link>
      <description>&lt;P&gt;The same order if you select them respectively. Is that possible?&lt;/P&gt;</description>
      <pubDate>Thu, 08 Aug 2019 14:33:59 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/lisp-for-creating-table-with-selected-text/m-p/8955696#M85608</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2019-08-08T14:33:59Z</dc:date>
    </item>
    <item>
      <title>Re: Lisp for creating table with selected text</title>
      <link>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/lisp-for-creating-table-with-selected-text/m-p/8955813#M85609</link>
      <description>&lt;DIV style="font-size: 1.1em; font-family: 'Artifakt'; line-height: 1.3em; margin: 15px 100px 80px 100px;"&gt;
&lt;P&gt;Here is a simple example, feel free to edit as needed, it's a&amp;nbsp;&lt;A href="http://cadpanacea.com/wp/?p=244" target="_blank" rel="noopener"&gt;modified version of this.&lt;/A&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;(vl-load-com)
(defun C:Foo ( / *MS* A CNT I LST MYTABLE PT1 ROW SSET TLST)

  ; create an empty list, set a counter variable, and
  ; set a reference to the current model space.
  (setq lst '()
 i 0
 *ms* (vla-get-modelspace
             (vla-get-activedocument
             (vlax-get-acad-object)))
  )
  ; prompt the user to select text
  (princ "\n Select text ")
  (if (setq sset (ssget '((0 . "TEXT"))))
    ; if a valid selection set was generated, then proceed.
    (progn
    
      ; for each Text object selected, grab the string and store these values in a list
      (repeat (setq cnt (sslength sset))
	(setq ent (entget (ssname sset i)))
        (setq string (cdr (assoc 1 ent)))
        (setq lst (cons string lst))
        (setq i (1+ i))
      )
      (setq lst (reverse lst))
      ; pick a point for the table
      (setq pt1 (getpoint "\nPick point for table "))
      ; add the new table
      (setq myTable (vla-AddTable 
                    *ms* 
                    (vlax-3d-point pt1)
                    cnt
                    1 
                    0.7
                    2.5))
      (setq row 0)
      
      ; loop through the list of text strings
      ; putting that string in the table
      (foreach item lst
        (vla-setText mytable
                     row
                     0 
                     item)        
        (setq row (1+ row))
      )      
      ; release "myTable" and *ms*
      (vlax-release-object myTable)      
      (vlax-release-object *ms*)      
    ); end progn
    (princ "\nNo text selected. ")
  ); end if
  (princ)
); end defun&lt;/PRE&gt;
&lt;/DIV&gt;</description>
      <pubDate>Thu, 08 Aug 2019 15:20:27 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/lisp-for-creating-table-with-selected-text/m-p/8955813#M85609</guid>
      <dc:creator>rkmcswain</dc:creator>
      <dc:date>2019-08-08T15:20:27Z</dc:date>
    </item>
    <item>
      <title>Re: Lisp for creating table with selected text</title>
      <link>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/lisp-for-creating-table-with-selected-text/m-p/8956826#M85610</link>
      <description>&lt;P&gt;No need for the list just use vl-add row and put text. a bit shorter.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;; simple single column table
; By Alan H Aug 2019

(vl-load-com)

(defun c:AH1col ( / pt1 numrows numcolumns rowheight colwidth ent doc curspace obj objtable) &lt;BR /&gt;(setq doc (vla-get-activedocument (vlax-get-acad-object)))
(setq curspace (vla-get-modelspace doc))

; now do table 

(setq pt1 (vlax-3d-point (getpoint "\nPick point for top left hand of table:  ")))
(setq numrows 2)
(setq numcolumns 1)
(setq rowheight 2.5)
(setq colwidth 40)
(setq objtable (vla-addtable curspace pt1 numrows numcolumns rowheight colwidth))
(vla-settext objtable 0 0 "Heading 1")
(vla-settext objtable 1 0 "Title 1")
(setq objtable (vlax-ename-&amp;gt;vla-object (entlast)))

(while (setq ent  (entsel "pick text object"))
(setq obj (vlax-ename-&amp;gt;vla-object (car ent)))
(if (= (vla-get-objectname obj) "AcDbText")
(progn
(vla-InsertRows objtable numrows 2.5 1)
(vla-settext objtable numrows 0  (vla-get-textstring obj))
(setq numrows (+ numrows 1))
)
(alert "pick again not a text")
)
)
(vlax-release-object objtable)
(princ)

) ; defun
(c:ah1col)&lt;/PRE&gt;</description>
      <pubDate>Fri, 09 Aug 2019 02:44:11 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/lisp-for-creating-table-with-selected-text/m-p/8956826#M85610</guid>
      <dc:creator>Sea-Haven</dc:creator>
      <dc:date>2019-08-09T02:44:11Z</dc:date>
    </item>
    <item>
      <title>Re: Lisp for creating table with selected text</title>
      <link>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/lisp-for-creating-table-with-selected-text/m-p/8957268#M85611</link>
      <description>&lt;P&gt;Wow guys this is amazing this is exactly the lisp I'm trying to find out. Hmmm I do have another question. How will you add a blank cell/row below at each selected text?&lt;BR /&gt;&lt;BR /&gt;For Example:&lt;BR /&gt;Row 1 : "Text 1"&lt;/P&gt;&lt;P&gt;Row 2: (blank cell)&lt;BR /&gt;Row 3: "Text 2"&lt;BR /&gt;Row 4: (blank cell)&lt;/P&gt;&lt;P&gt;Row 5: "Text 3"&lt;BR /&gt;So on and so forth...&lt;/P&gt;</description>
      <pubDate>Fri, 09 Aug 2019 09:19:54 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/lisp-for-creating-table-with-selected-text/m-p/8957268#M85611</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2019-08-09T09:19:54Z</dc:date>
    </item>
    <item>
      <title>Re: Lisp for creating table with selected text</title>
      <link>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/lisp-for-creating-table-with-selected-text/m-p/8957358#M85612</link>
      <description>&lt;P&gt;Try with this change.......&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;.......
      (foreach item lst
        (vla-setText mytable
                     row
                     0 
                     item)     
	(setq row (1+ row))
	&lt;FONT color="#0000FF"&gt;(vla-setText mytable row 0  "")&lt;/FONT&gt;      					 
        &lt;FONT color="#0000FF"&gt;(setq row (1+ row))&lt;/FONT&gt;
      )  
.......&lt;/PRE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 09 Aug 2019 10:29:31 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/lisp-for-creating-table-with-selected-text/m-p/8957358#M85612</guid>
      <dc:creator>dbhunia</dc:creator>
      <dc:date>2019-08-09T10:29:31Z</dc:date>
    </item>
    <item>
      <title>Re: Lisp for creating table with selected text</title>
      <link>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/lisp-for-creating-table-with-selected-text/m-p/8961276#M85613</link>
      <description>&lt;P&gt;I'm really struggling about these codes hahaha. You guys really are awesome and have been a really big help to me. By the way, if I were to do a two column with the same idea of selecting texts respectively, how are the codes should be?&amp;nbsp; It's just like my first question, just making it two column.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Example:&lt;/P&gt;&lt;P&gt;Column 1&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;Column 2&lt;/P&gt;&lt;P&gt;"Text 1"&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;"Text 2"&lt;/P&gt;&lt;P&gt;"Text 3"&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;"Text 4"&lt;/P&gt;&lt;P&gt;"Text 5"&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;"Text 6"&lt;/P&gt;</description>
      <pubDate>Mon, 12 Aug 2019 15:19:03 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/lisp-for-creating-table-with-selected-text/m-p/8961276#M85613</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2019-08-12T15:19:03Z</dc:date>
    </item>
    <item>
      <title>Re: Lisp for creating table with selected text</title>
      <link>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/lisp-for-creating-table-with-selected-text/m-p/8962324#M85614</link>
      <description>&lt;P&gt;Need to confirm 2 rows, pick order as per your previous post.&lt;/P&gt;&lt;P&gt;A blank line in between ?????&lt;/P&gt;&lt;P&gt;Title is ?????&lt;/P&gt;&lt;P&gt;Header is ??????&lt;/P&gt;</description>
      <pubDate>Tue, 13 Aug 2019 01:06:29 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/lisp-for-creating-table-with-selected-text/m-p/8962324#M85614</guid>
      <dc:creator>Sea-Haven</dc:creator>
      <dc:date>2019-08-13T01:06:29Z</dc:date>
    </item>
    <item>
      <title>Re: Lisp for creating table with selected text</title>
      <link>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/lisp-for-creating-table-with-selected-text/m-p/8962378#M85615</link>
      <description>&lt;P&gt;Title and Header is anything actually hehehe, the important part actually is when I select texts continuously, it will be on the table and the code you guys made last time is helping me right now. I'm also trying to figure out a code that will make a table with selected texts continuously or respectively, but this time, it will be two columns instead of one, blank is not necessarily this time.&lt;/P&gt;</description>
      <pubDate>Tue, 13 Aug 2019 02:26:03 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/lisp-for-creating-table-with-selected-text/m-p/8962378#M85615</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2019-08-13T02:26:03Z</dc:date>
    </item>
    <item>
      <title>Re: Lisp for creating table with selected text</title>
      <link>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/lisp-for-creating-table-with-selected-text/m-p/8962782#M85616</link>
      <description>&lt;P&gt;A how many columns is probably the better approach and you can mix and match then by using say - as a blank entry. Need to have a think.&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 13 Aug 2019 09:14:07 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/lisp-for-creating-table-with-selected-text/m-p/8962782#M85616</guid>
      <dc:creator>Sea-Haven</dc:creator>
      <dc:date>2019-08-13T09:14:07Z</dc:date>
    </item>
    <item>
      <title>Re: Lisp for creating table with selected text</title>
      <link>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/lisp-for-creating-table-with-selected-text/m-p/8962809#M85617</link>
      <description>&lt;P&gt;Say, if I have multiple texts like a hundreds of text maybe, then if I will select it continuously, it will create a table something like this:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;FONT color="#0000FF"&gt;Column 1&lt;/FONT&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&lt;FONT color="#0000FF"&gt;Column 2&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT color="#0000FF"&gt;Row 1&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&lt;FONT color="#000000"&gt;Text 1&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;Text 2&lt;/FONT&gt;&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT color="#0000FF"&gt;Row 2&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&lt;FONT color="#000000"&gt;Text 3&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; Text 3&lt;/FONT&gt;&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT color="#0000FF"&gt;Row 3&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&lt;FONT color="#000000"&gt;Text 4&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; Text 5&lt;/FONT&gt;&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT color="#0000FF"&gt;.....&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;And so on....&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Something like that maybe. It's more likely the same with the first one, except that it has two columns rather than one column. Is that possible?&lt;/P&gt;</description>
      <pubDate>Tue, 13 Aug 2019 09:23:23 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/lisp-for-creating-table-with-selected-text/m-p/8962809#M85617</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2019-08-13T09:23:23Z</dc:date>
    </item>
    <item>
      <title>Re: Lisp for creating table with selected text</title>
      <link>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/lisp-for-creating-table-with-selected-text/m-p/8963046#M85618</link>
      <description>&lt;P&gt;@Anonymous&amp;nbsp; Try with this modified code of&amp;nbsp;&lt;a href="https://forums.autodesk.com/t5/user/viewprofilepage/user-id/6254908"&gt;@Sea-Haven&lt;/a&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;(defun c:AH1col ( / pt1 numrows numcolumns rowheight colwidth ent doc curspace obj objtable col) 
(vl-load-com)
(setq doc (vla-get-activedocument (vlax-get-acad-object)))
(setq curspace (vla-get-modelspace doc))
; now do table 
(setq pt1 (vlax-3d-point (getpoint "\nPick point for top left hand of table:  ")))
(setq numrows 2)
&lt;FONT color="#0000FF"&gt;(setq numcolumns 2)&lt;/FONT&gt;
(setq rowheight 2.5)
(setq colwidth 20)
(setq objtable (vla-addtable curspace pt1 numrows numcolumns rowheight colwidth))
(vla-settext objtable 0 0 "TABLE")
;(vla-settext objtable 1 0 "Title 1")
&lt;FONT color="#0000FF"&gt;(vla-settext objtable 1 0 "COLUMN 1")
(vla-settext objtable 1 1 "COLUMN 2")&lt;/FONT&gt;

(setq objtable (vlax-ename-&amp;gt;vla-object (entlast)))
&lt;FONT color="#0000FF"&gt;(setq col 0)&lt;/FONT&gt;
(while (setq ent  (entsel "pick text object"))
	(setq obj (vlax-ename-&amp;gt;vla-object (car ent)))
	(if (= (vla-get-objectname obj) "AcDbText")
		(progn
			; (vla-InsertRows objtable numrows 2.5 1)
			; (vla-settext objtable numrows 0  (vla-get-textstring obj))
			; (setq numrows (+ numrows 1))
			&lt;FONT color="#0000FF"&gt;(if (= col 0)
				(progn
					(vla-InsertRows objtable numrows 2.5 1)
					(vla-setText objtable numrows col (vla-get-textstring obj))
					(setq col (1+ col))
				)
				(progn
					(vla-setText objtable numrows col (vla-get-textstring obj))  
					(setq col 0)
					(setq numrows (1+ numrows))
				)
			)&lt;/FONT&gt;
		)
		(alert "pick again not a text")
	)
)
(vlax-release-object objtable)
(princ)
)&lt;/PRE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 13 Aug 2019 11:31:49 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/lisp-for-creating-table-with-selected-text/m-p/8963046#M85618</guid>
      <dc:creator>dbhunia</dc:creator>
      <dc:date>2019-08-13T11:31:49Z</dc:date>
    </item>
    <item>
      <title>Re: Lisp for creating table with selected text</title>
      <link>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/lisp-for-creating-table-with-selected-text/m-p/8964733#M85619</link>
      <description>&lt;P&gt;My idea was ask for how many columns and then insert rows, the entry would be pick pick pick but would have a if nil then exit the input this way if entries are not = 3 will still work. can use a (exit) to force a hard close of the program. This way if next request is 3 columns it is done. Just need some time.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 14 Aug 2019 03:34:33 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/lisp-for-creating-table-with-selected-text/m-p/8964733#M85619</guid>
      <dc:creator>Sea-Haven</dc:creator>
      <dc:date>2019-08-14T03:34:33Z</dc:date>
    </item>
    <item>
      <title>Re: Lisp for creating table with selected text</title>
      <link>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/lisp-for-creating-table-with-selected-text/m-p/8964768#M85620</link>
      <description>&lt;P&gt;Try this&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;(defun c:AHxcol ( / pt1 numrows numcolumns rowheight colwidth ent doc curspace obj objtable col) 
(vl-load-com)
(setq doc (vla-get-activedocument (vlax-get-acad-object)))
(setq curspace (vla-get-modelspace doc))
; now do table 
(setq pt1 (vlax-3d-point (getpoint "\nPick point for top left hand of table:  ")))
(setq numcolumns (getint "how many columns"))
(setq txtsz (getreal "enter text size"))

(setq numrows 2)
(setq rowheight txtsz)
(setq colwidth (* 10 txtsz))
(setq objtable (vla-addtable curspace pt1 numrows numcolumns rowheight colwidth))
(vla-settext objtable 0 0 "TABLE")
(setq x 1)
(repeat numcolumns
	(vla-settext objtable 1 (- x 1) (strcat "COLUMN " (rtos x 2 0)))
	(setq x (+ x 1))
)

(setq objtable (vlax-ename-&amp;gt;vla-object (entlast)))
(vla-InsertRows objtable numrows txtsz 1)
(setq col 0)
(while (setq ent  (entsel "pick text object"))
	(setq obj (vlax-ename-&amp;gt;vla-object (car ent)))
	(if (= (vla-get-objectname obj) "AcDbText")
		(progn
			(vla-settext objtable numrows col  (vla-get-textstring obj))
			(setq col (+ col 1))
			(if (= col numcolumns)
				(progn
				(setq col 0)
				(setq numrows (+ numrows 1))
				(vla-InsertRows objtable numrows txtsz 1)
				)
			)
		)
	)
)
(vlax-release-object objtable)
(princ)
)

(c:AHxcol)&lt;/PRE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 14 Aug 2019 04:20:07 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/lisp-for-creating-table-with-selected-text/m-p/8964768#M85620</guid>
      <dc:creator>Sea-Haven</dc:creator>
      <dc:date>2019-08-14T04:20:07Z</dc:date>
    </item>
    <item>
      <title>Re: Lisp for creating table with selected text</title>
      <link>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/lisp-for-creating-table-with-selected-text/m-p/8971915#M85621</link>
      <description>&lt;P&gt;Wow &lt;a href="https://forums.autodesk.com/t5/user/viewprofilepage/user-id/6254908"&gt;@Sea-Haven&lt;/a&gt;&amp;nbsp; your idea was great and incredible, I really liked the way it will ask how many columns I need which actually is helping alot with the one I am working with right now. Thank you all brothers you've been a great help and I liked all your ideas &lt;span class="lia-unicode-emoji" title=":slightly_smiling_face:"&gt;🙂&lt;/span&gt;&lt;BR /&gt;&lt;BR /&gt;I have another question though, is there a way I could unselect the text or maybe remove the text that was in the table like maybe holding SHIFT or something?&lt;/P&gt;</description>
      <pubDate>Sun, 18 Aug 2019 01:53:14 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/lisp-for-creating-table-with-selected-text/m-p/8971915#M85621</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2019-08-18T01:53:14Z</dc:date>
    </item>
    <item>
      <title>Re: Lisp for creating table with selected text</title>
      <link>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/lisp-for-creating-table-with-selected-text/m-p/8971924#M85622</link>
      <description>&lt;P&gt;Unfortunately if you make a mistake there is no quick way to un select to put a confirm would slow it down so much.&amp;nbsp; Rather it could be add to existing table so just stop erase item, then continue on. It would need a re-work of the code. Would that be suitable ? But I would need time to do.&lt;/P&gt;</description>
      <pubDate>Sun, 18 Aug 2019 02:16:45 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/lisp-for-creating-table-with-selected-text/m-p/8971924#M85622</guid>
      <dc:creator>Sea-Haven</dc:creator>
      <dc:date>2019-08-18T02:16:45Z</dc:date>
    </item>
    <item>
      <title>Re: Lisp for creating table with selected text</title>
      <link>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/lisp-for-creating-table-with-selected-text/m-p/8971926#M85623</link>
      <description>There is a question about text height you should be able to put 500 in it. Did you use my last posted version ?&lt;BR /&gt;&lt;BR /&gt;Let me know or post a sample dwg I can re-run over the table with a resize.&lt;BR /&gt;</description>
      <pubDate>Sun, 18 Aug 2019 02:26:10 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/lisp-for-creating-table-with-selected-text/m-p/8971926#M85623</guid>
      <dc:creator>Sea-Haven</dc:creator>
      <dc:date>2019-08-18T02:26:10Z</dc:date>
    </item>
    <item>
      <title>Re: Lisp for creating table with selected text</title>
      <link>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/lisp-for-creating-table-with-selected-text/m-p/8971939#M85624</link>
      <description>&lt;P&gt;You're right it's kinda bothering if you made a minor mistake on clicking hahaha. Well if it's okay for you that would be a big help, but I do not want to take your time, maybe if you have free time that would be okay for me. You're already giving me so much help and I am thankful for that and I don't want to take too much time for you.&amp;nbsp;&lt;BR /&gt;&lt;BR /&gt;PS: I already found a solution for the text height, I just need to go to tablestyle to edit it hahaha &lt;span class="lia-unicode-emoji" title=":slightly_smiling_face:"&gt;🙂&lt;/span&gt;&lt;/P&gt;</description>
      <pubDate>Sun, 18 Aug 2019 03:22:07 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/lisp-for-creating-table-with-selected-text/m-p/8971939#M85624</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2019-08-18T03:22:07Z</dc:date>
    </item>
    <item>
      <title>Re: Lisp for creating table with selected text</title>
      <link>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/lisp-for-creating-table-with-selected-text/m-p/8971943#M85625</link>
      <description>&lt;P&gt;I fixed the text height problem in this version. Making tables has a few quirks. See attached, there is a way also of checking each text and making the columns wider but complicated for this type of table randomly picking.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Sun, 18 Aug 2019 03:27:50 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/lisp-for-creating-table-with-selected-text/m-p/8971943#M85625</guid>
      <dc:creator>Sea-Haven</dc:creator>
      <dc:date>2019-08-18T03:27:50Z</dc:date>
    </item>
  </channel>
</rss>

