<?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: Extract text from layer and fill into a certain table in Visual LISP, AutoLISP and General Customization Forum</title>
    <link>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/extract-text-from-layer-and-fill-into-a-certain-table/m-p/11609253#M37372</link>
    <description>&lt;P&gt;I have to move from the drawing header to the area "Betsy med lag".&lt;/P&gt;&lt;P&gt;Each different text is placed in a specific layer, and with running a lisp I would like to fille the area "Betsy med lag".&lt;/P&gt;</description>
    <pubDate>Fri, 09 Dec 2022 13:41:39 GMT</pubDate>
    <dc:creator>ki76EPG</dc:creator>
    <dc:date>2022-12-09T13:41:39Z</dc:date>
    <item>
      <title>Extract text from layer and fill into a certain table</title>
      <link>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/extract-text-from-layer-and-fill-into-a-certain-table/m-p/11606026#M37368</link>
      <description>&lt;P&gt;I have a drawing header with information I would like to draw to an existing table.&lt;/P&gt;&lt;P&gt;Is it possible with a lisp to get the text and write it in a certain place in a table (Maybe by clicking on the corner of the table.)&lt;/P&gt;</description>
      <pubDate>Thu, 08 Dec 2022 08:29:53 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/extract-text-from-layer-and-fill-into-a-certain-table/m-p/11606026#M37368</guid>
      <dc:creator>ki76EPG</dc:creator>
      <dc:date>2022-12-08T08:29:53Z</dc:date>
    </item>
    <item>
      <title>Re: Extract text from layer and fill into a certain table</title>
      <link>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/extract-text-from-layer-and-fill-into-a-certain-table/m-p/11608948#M37369</link>
      <description>&lt;P&gt;Ok 1st there are no Acad "TABLES" in sample dwg, rather text within line boxes, so maybe answer to your question is to set osnap to intersection and pick the lower left corner of 2 lines then you have a point to work from for the text input.&lt;/P&gt;&lt;P&gt;Offsets x=50 y=115&lt;/P&gt;&lt;P&gt;A fairly simple lisp calculation.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;This may need some extras added but give it a try.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="general"&gt;(defun c:txt2cnr ( / oldsnap txt pt)
(setq oldsnap (getvar 'osmode))
(setq txt (cdr (assoc 1 (entget (car (entsel "\nSelect text"))))))
(setvar 'osmode 32)
(setq pt (getpoint "\npick point for text "))
(setvar 'clayer "Tekst")
(setq pt (mapcar '+ pt (list 50 115 0.0)))
(command "text" pt "" "" txt)
(setvar 'osmode oldsnap)
(princ)
)
(c:txt2cnr)&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;</description>
      <pubDate>Fri, 09 Dec 2022 11:25:20 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/extract-text-from-layer-and-fill-into-a-certain-table/m-p/11608948#M37369</guid>
      <dc:creator>Sea-Haven</dc:creator>
      <dc:date>2022-12-09T11:25:20Z</dc:date>
    </item>
    <item>
      <title>Re: Extract text from layer and fill into a certain table</title>
      <link>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/extract-text-from-layer-and-fill-into-a-certain-table/m-p/11609049#M37370</link>
      <description>&lt;P&gt;It&amp;nbsp;&lt;/P&gt;&lt;P&gt;Is it possible to pick all text in a certain layer?&lt;/P&gt;&lt;P&gt;If I then have all single text in different layers, I could place it by the lisp.&lt;/P&gt;</description>
      <pubDate>Fri, 09 Dec 2022 12:23:45 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/extract-text-from-layer-and-fill-into-a-certain-table/m-p/11609049#M37370</guid>
      <dc:creator>ki76EPG</dc:creator>
      <dc:date>2022-12-09T12:23:45Z</dc:date>
    </item>
    <item>
      <title>Re: Extract text from layer and fill into a certain table</title>
      <link>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/extract-text-from-layer-and-fill-into-a-certain-table/m-p/11609116#M37371</link>
      <description>&lt;P&gt;&lt;a href="https://forums.autodesk.com/t5/user/viewprofilepage/user-id/13094532"&gt;@ki76EPG&lt;/a&gt;&amp;nbsp; hi,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;BLOCKQUOTE&gt;&lt;HR /&gt;&lt;a href="https://forums.autodesk.com/t5/user/viewprofilepage/user-id/13094532"&gt;@ki76EPG&lt;/a&gt;&amp;nbsp;wrote:&lt;BR /&gt;&lt;P&gt;Is it possible to pick all text in a certain layer?&amp;nbsp; &lt;FONT color="#FF0000"&gt;YES&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;If I then have all single text in different layers, I could place it by the lisp.&amp;nbsp;&lt;FONT color="#FF0000"&gt;you did not gave us any &lt;SPAN&gt;relevant&lt;/SPAN&gt; info to help you?&lt;/FONT&gt;&lt;/P&gt;&lt;HR /&gt;&lt;/BLOCKQUOTE&gt;&lt;P&gt;&lt;FONT color="#333300"&gt;Say you picked these texts on a specific layer, now what? how do we know which text goes to which table\cell?&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT color="#333300"&gt;is there any&amp;nbsp;&lt;SPAN&gt;criteria?&lt;/SPAN&gt;&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;FONT color="#333300"&gt;&lt;SPAN&gt;tell us how do you do it manually, post a dwg with a preview before and after.&lt;/SPAN&gt;&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;FONT color="#333300"&gt;&lt;SPAN&gt;Moshe&lt;/SPAN&gt;&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 09 Dec 2022 12:50:07 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/extract-text-from-layer-and-fill-into-a-certain-table/m-p/11609116#M37371</guid>
      <dc:creator>Moshe-A</dc:creator>
      <dc:date>2022-12-09T12:50:07Z</dc:date>
    </item>
    <item>
      <title>Re: Extract text from layer and fill into a certain table</title>
      <link>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/extract-text-from-layer-and-fill-into-a-certain-table/m-p/11609253#M37372</link>
      <description>&lt;P&gt;I have to move from the drawing header to the area "Betsy med lag".&lt;/P&gt;&lt;P&gt;Each different text is placed in a specific layer, and with running a lisp I would like to fille the area "Betsy med lag".&lt;/P&gt;</description>
      <pubDate>Fri, 09 Dec 2022 13:41:39 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/extract-text-from-layer-and-fill-into-a-certain-table/m-p/11609253#M37372</guid>
      <dc:creator>ki76EPG</dc:creator>
      <dc:date>2022-12-09T13:41:39Z</dc:date>
    </item>
    <item>
      <title>Re: Extract text from layer and fill into a certain table</title>
      <link>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/extract-text-from-layer-and-fill-into-a-certain-table/m-p/11609284#M37373</link>
      <description>&lt;P&gt;I think I have to pick the intersection in the area and from there place the text.&lt;/P&gt;</description>
      <pubDate>Fri, 09 Dec 2022 13:55:35 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/extract-text-from-layer-and-fill-into-a-certain-table/m-p/11609284#M37373</guid>
      <dc:creator>ki76EPG</dc:creator>
      <dc:date>2022-12-09T13:55:35Z</dc:date>
    </item>
    <item>
      <title>Re: Extract text from layer and fill into a certain table</title>
      <link>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/extract-text-from-layer-and-fill-into-a-certain-table/m-p/11609424#M37374</link>
      <description>&lt;P&gt;&lt;a href="https://forums.autodesk.com/t5/user/viewprofilepage/user-id/13094532"&gt;@ki76EPG&lt;/a&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;i tried to match the numbers between &lt;SPAN&gt;header to the area "Betsy med lag" and could not find a match. maybe cause i don't speak your language so put the&amp;nbsp;"Betsy med lag" near the header and draw a lines between the texts and their position in table.&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;i'm now going to see the 1/4 final football game&amp;nbsp;&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;Moshe&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 09 Dec 2022 14:52:05 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/extract-text-from-layer-and-fill-into-a-certain-table/m-p/11609424#M37374</guid>
      <dc:creator>Moshe-A</dc:creator>
      <dc:date>2022-12-09T14:52:05Z</dc:date>
    </item>
    <item>
      <title>Re: Extract text from layer and fill into a certain table</title>
      <link>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/extract-text-from-layer-and-fill-into-a-certain-table/m-p/11609873#M37375</link>
      <description>&lt;P&gt;&lt;U&gt;What a game..&lt;/U&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;U&gt;I try to show arraows for what I looking for and sent it again. It will first be monday mor ing, so good weekend ti your and Hopefully we get some great football this evening and tomorrow&amp;nbsp;&lt;/U&gt;&lt;/P&gt;</description>
      <pubDate>Fri, 09 Dec 2022 17:57:01 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/extract-text-from-layer-and-fill-into-a-certain-table/m-p/11609873#M37375</guid>
      <dc:creator>ki76EPG</dc:creator>
      <dc:date>2022-12-09T17:57:01Z</dc:date>
    </item>
    <item>
      <title>Re: Extract text from layer and fill into a certain table</title>
      <link>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/extract-text-from-layer-and-fill-into-a-certain-table/m-p/11611729#M37376</link>
      <description>&lt;P&gt;Regards&amp;nbsp;&lt;a href="https://forums.autodesk.com/t5/user/viewprofilepage/user-id/13094532"&gt;@ki76EPG&lt;/a&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Here you have an alternative inserting data into an Acad table&lt;/P&gt;&lt;LI-CODE lang="general"&gt;(vl-load-com)
(defun c:insDat (/ ms nf nc pt numrows rowh colw mytab)
  (princ "\nEnter Enter Data in the Table...:")
  (setq H0  (getint "\nENTER VALUE H0JDE:")
        LÆ  (getint "\nENTER VALUE LÆNGDE:")
        TY  (getint "\nENTER VALUE TYKKELSE:")
        AN  (getint "\nENTER VALUE ANTAL:")
        VE  (getstring "\nENTER TEXT VENDEELEMENT:")
        EM  (getstring "\nENTER TEXT EMNE:")
        SA  (getint "\nENTER VALUE SAGSNR:")
        VÆT (getint "\nENTER VALUE VÆGT TOTAL:")
        VÆF (getint "\nENTER VALUE VÆGT FORPLADE:")
        VÆB (getint "\nENTER VALUE VÆGT BAGPLADE:")
        BU  (getint "\nENTER VALUE BUNDEN ARM:")
        NE  (getint "\nENTER VALUE NET:")
        EK  (getint "\nENTER VALUE EKSP.KL:")
  )
  (Setq ms
             (vla-get-Modelspace (vla-get-ActiveDocument (vlax-get-acad-object)))
        nf   15
        nc   3
        pt   (getpoint "\nData Table Insertion Point: ")
        rowh 350
        colW 1800
  )
  (setq mytab (vla-addtable ms (vlax-3d-point pt) nf nc rowh ColW))
                                                  ;Nfila,NColum,alt.Celda,ancho de celda
  (vla-setcolumnwidth mytab 0 600)
  (vla-put-StyleName mytab "Standard")
  (vla-put-HorzCellMargin mytab 50)
  (vla-SetTextHeight mytab (+ acDataRow acHeaderRow acTitleRow) 121.25)
  (vla-SetAlignment mytab acDataRow acmiddleleft)
  (vla-SetText mytab 0 0 "INFORMATIONER")
  (vla-SetText mytab 1 0 "Pos.:")
  (vla-SetText mytab 1 1 "EMNE")
  (vla-SetText mytab 1 2 "VÆRDI")
  (vla-SetText mytab 2 1 "H0JDE")
  (vla-settext mytab 2 2 (itoa H0))
  (vla-SetText mytab 3 1 "LÆNGDE")
  (vla-settext mytab 3 2 (itoa LÆ))
  (vla-SetText mytab 4 1 "TYKKELSE")
  (vla-settext mytab 4 2 (itoa TY))
  (vla-SetText mytab 5 1 "ANTAL")
  (vla-settext mytab 5 2 (itoa AN))
  (vla-SetText mytab 6 1 "VENDEELEMENT")
  (vla-SetText mytab 6 2 VE)
  (vla-SetText mytab 7 1 "EMNE")
  (vla-SetText mytab 7 2 EM)
  (vla-SetText mytab 8 1 "SAGSNR")
  (vla-SetText mytab 8 2 (itoa SA))
  (vla-SetText mytab 9 1 "VÆGT TOTAL")
  (vla-SetText mytab 9 2 (itoa VÆT))
  (vla-SetText mytab 10 1 "VÆGT FORPLADE")
  (vla-SetText mytab 10 2 (itoa VÆF))
  (vla-SetText mytab 11 1 "VÆGT BAGPLADE")
  (vla-SetText mytab 11 2 (itoa VÆB))
  (vla-SetText mytab 12 1 "BUNDEN ARM:")
  (vla-SetText mytab 12 2 (itoa BU))
  (vla-SetText mytab 13 1 "NET")
  (vla-SetText mytab 13 2 (itoa NE))
  (vla-SetText mytab 14 1 "EKSP.KL")
  (vla-SetText mytab 14 2 (itoa EK))
  (vlax-release-object mytab)
)&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Sun, 11 Dec 2022 02:00:52 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/extract-text-from-layer-and-fill-into-a-certain-table/m-p/11611729#M37376</guid>
      <dc:creator>calderg1000</dc:creator>
      <dc:date>2022-12-11T02:00:52Z</dc:date>
    </item>
    <item>
      <title>Re: Extract text from layer and fill into a certain table</title>
      <link>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/extract-text-from-layer-and-fill-into-a-certain-table/m-p/11632185#M37377</link>
      <description>&lt;P&gt;Regards&amp;nbsp;&lt;a href="https://forums.autodesk.com/t5/user/viewprofilepage/user-id/13094532"&gt;@ki76EPG&lt;/a&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Try this code to select text data&lt;BR /&gt;ACAD and insert into the cells of the Table. Note that VENDEELEMENT and EKSP.KL are dynamic blocks.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="general"&gt;(defun c:insDat1 (/ ms nf nc pt numrows rowh colw mytab)
  (Setq ms (vla-get-Modelspace (vla-get-ActiveDocument (vlax-get-acad-object))))
  (princ "\nSelect Data to insert into the Table...:")
  (setq H0  (princ(cdr (assoc 1 (entget (setq snh(car (entsel "\nSELECT VALUE H0JDE: ")))))))       
        LÆ  (princ(cdr (assoc 1 (entget (car (entsel "\nSELECT VALUE LÆNGDE: "))))))
        TY  (princ(cdr (assoc 1 (entget (car (entsel "\nSELECT VALUE TYKKELSE: "))))))
        AN  (princ(cdr (assoc 1 (entget (car (entsel "\nSELECT VALUE ANTAL: "))))))
        VE  (car (entsel "\nSELECT VALUE VENDEELEMENT: "));Block
        EM  (princ(cdr (assoc 1 (entget (car (entsel "\nSELECT VALUE EMNE: "))))))
        SA  (princ(cdr (assoc 1 (entget (car (entsel "\nSELECT VALUE SAGSNR: "))))))
        VÆT (princ(cdr (assoc 1 (entget (car (entsel "\nSELECT VALUE VÆGT TOTAL: "))))))
        VÆF (princ(cdr (assoc 1 (entget (car (entsel "\nSELECT VALUE VÆGT FORPLADE: "))))))
        VÆB (princ(cdr (assoc 1 (entget (car (entsel "\nSELECT VALUE VÆGT BAGPLADE: "))))))
        BU  (princ(cdr (assoc 1 (entget (car (entsel "\nSELECT VALUE BUNDEN ARM: "))))))
        NE  (princ(cdr (assoc 1 (entget (car (entsel "\nSELECT VALUE NET: "))))))
        EK  (car (entsel "\nSELECT VALUE EKSP.KL: "));Block
  )
  (Setq pt    (vlax-3d-point(getpoint "\nData Table Insertion Point: "))
        nf    15
        nc    3
        rowh  350
        colW  1800
        mytab (vla-addtable ms pt nf nc rowh ColW)
  )
  (vla-setcolumnwidth mytab 0 600)
  (vla-put-StyleName mytab "Standard")
  (vla-put-HorzCellMargin mytab 50)
  (vla-SetTextHeight mytab (+ acTitleRow) 140)
  (vla-SetTextHeight mytab (+ acDataRow acHeaderRow) 121.25)
  (vla-SetAlignment mytab acDataRow acmiddleleft)
  (vla-SetText mytab 0 0 "INFORMATIONER")
  (vla-SetText mytab 1 0 "Pos.:")
  (vla-SetText mytab 1 1 "EMNE")
  (vla-SetText mytab 1 2 "VÆRDI")
  (vla-SetText mytab 2 1 "H0JDE")
  (vla-settext mytab 2 2 H0)
  (vla-SetText mytab 3 1 "LÆNGDE")
  (vla-settext mytab 3 2 LÆ)
  (vla-SetText mytab 4 1 "TYKKELSE")
  (vla-settext mytab 4 2 TY)
  (vla-SetText mytab 5 1 "ANTAL")
  (vla-settext mytab 5 2 AN)
  (vla-SetText mytab 6 1 "VENDEELEMENT")
  (vla-SetText mytab 6 2 (strcase(DP VE)))
  (vla-SetText mytab 7 1 "EMNE")
  (vla-SetText mytab 7 2 EM)
  (vla-SetText mytab 8 1 "SAGSNR")
  (vla-SetText mytab 8 2 SA)
  (vla-SetText mytab 9 1 "VÆGT TOTAL")
  (vla-SetText mytab 9 2 VÆT)
  (vla-SetText mytab 10 1 "VÆGT FORPLADE")
  (vla-SetText mytab 10 2 VÆF)
  (vla-SetText mytab 11 1 "VÆGT BAGPLADE")
  (vla-SetText mytab 11 2 VÆB)
  (vla-SetText mytab 12 1 "BUNDEN ARM:")
  (vla-SetText mytab 12 2 BU)
  (vla-SetText mytab 13 1 "NET")
  (vla-SetText mytab 13 2 NE)
  (vla-SetText mytab 14 1 "EKSP.KL")
  (vla-SetText mytab 14 2 (DP EK))
  (vlax-release-object mytab)
)
;_
 (defun DP (s)
   (setq bdn (car (vlax-safearray-&amp;gt;list
                     (vlax-variant-value
                       (vla-GetDynamicBlockProperties (vlax-ename-&amp;gt;vla-object s))
                     )
                   )
              )
         nv   (vlax-get bdn 'value)
   )
 )&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 20 Dec 2022 16:27:08 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/extract-text-from-layer-and-fill-into-a-certain-table/m-p/11632185#M37377</guid>
      <dc:creator>calderg1000</dc:creator>
      <dc:date>2022-12-20T16:27:08Z</dc:date>
    </item>
  </channel>
</rss>

