<?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 Adding dynamic block from excel file in Dynamic Blocks Forum</title>
    <link>https://forums.autodesk.com/t5/dynamic-blocks-forum/adding-dynamic-block-from-excel-file/m-p/11305958#M7124</link>
    <description>&lt;P&gt;Hi! &lt;span class="lia-unicode-emoji" title=":slightly_smiling_face:"&gt;🙂&lt;/span&gt;&lt;/P&gt;&lt;P&gt;I am young student just starting my way in lisp coding and I need a little help.&lt;/P&gt;&lt;P&gt;I am trying to add from excel file dynamic blocks to dwg file, that will appear in certain locations writen in csv/xlsx file. It supposed to look like this:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="tag.png" style="width: 355px;"&gt;&lt;img src="https://forums.autodesk.com/t5/image/serverpage/image-id/1093179i7A0F525A85CE82BD/image-size/large?v=v2&amp;amp;px=999" role="button" title="tag.png" alt="tag.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;The tricky part is that I have to write a LISP doing it automaticlly. Can someone please help? &lt;span class="lia-unicode-emoji" title=":slightly_smiling_face:"&gt;🙂&lt;/span&gt;&lt;/P&gt;&lt;P&gt;Thanks in advance!&lt;/P&gt;&lt;P&gt;In attached files I am adding excel file with sample coordinates.&lt;/P&gt;</description>
    <pubDate>Tue, 19 Jul 2022 10:43:15 GMT</pubDate>
    <dc:creator>maria.stachura</dc:creator>
    <dc:date>2022-07-19T10:43:15Z</dc:date>
    <item>
      <title>Adding dynamic block from excel file</title>
      <link>https://forums.autodesk.com/t5/dynamic-blocks-forum/adding-dynamic-block-from-excel-file/m-p/11305958#M7124</link>
      <description>&lt;P&gt;Hi! &lt;span class="lia-unicode-emoji" title=":slightly_smiling_face:"&gt;🙂&lt;/span&gt;&lt;/P&gt;&lt;P&gt;I am young student just starting my way in lisp coding and I need a little help.&lt;/P&gt;&lt;P&gt;I am trying to add from excel file dynamic blocks to dwg file, that will appear in certain locations writen in csv/xlsx file. It supposed to look like this:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="tag.png" style="width: 355px;"&gt;&lt;img src="https://forums.autodesk.com/t5/image/serverpage/image-id/1093179i7A0F525A85CE82BD/image-size/large?v=v2&amp;amp;px=999" role="button" title="tag.png" alt="tag.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;The tricky part is that I have to write a LISP doing it automaticlly. Can someone please help? &lt;span class="lia-unicode-emoji" title=":slightly_smiling_face:"&gt;🙂&lt;/span&gt;&lt;/P&gt;&lt;P&gt;Thanks in advance!&lt;/P&gt;&lt;P&gt;In attached files I am adding excel file with sample coordinates.&lt;/P&gt;</description>
      <pubDate>Tue, 19 Jul 2022 10:43:15 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/dynamic-blocks-forum/adding-dynamic-block-from-excel-file/m-p/11305958#M7124</guid>
      <dc:creator>maria.stachura</dc:creator>
      <dc:date>2022-07-19T10:43:15Z</dc:date>
    </item>
    <item>
      <title>Re: Adding dynamic block from excel file</title>
      <link>https://forums.autodesk.com/t5/dynamic-blocks-forum/adding-dynamic-block-from-excel-file/m-p/11311791#M7125</link>
      <description>&lt;P&gt;Check out the Lisp forum&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/bd-p/130" target="_blank"&gt;https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/bd-p/130&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Also i would look into&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;A href="https://www.theswamp.org/" target="_blank"&gt;https://www.theswamp.org/&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 21 Jul 2022 15:22:13 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/dynamic-blocks-forum/adding-dynamic-block-from-excel-file/m-p/11311791#M7125</guid>
      <dc:creator>TheCADnoob</dc:creator>
      <dc:date>2022-07-21T15:22:13Z</dc:date>
    </item>
    <item>
      <title>Re: Adding dynamic block from excel file</title>
      <link>https://forums.autodesk.com/t5/dynamic-blocks-forum/adding-dynamic-block-from-excel-file/m-p/11312471#M7126</link>
      <description>&lt;P&gt;If you need to create the block from scratch, that's beyond me (from LISP).&amp;nbsp; If the block definition already exists within the drawing file, then that's easier.&amp;nbsp; You should be taking parts of the sample LISPS already included with AutoCAD and from the web to do find the code sections you need for your algorithm.&amp;nbsp; The tasks you are needing to do are:&lt;/P&gt;&lt;UL&gt;&lt;LI&gt;open excel file;&lt;/LI&gt;&lt;LI&gt;make list from excel file data;&lt;/LI&gt;&lt;LI&gt;(looping from your list) insert (pre-defined) dynamic block at user-specified coordinates;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;From there you have one of two options.&amp;nbsp; You can make your LISP either assign the block attributes at the time of insertion, or you can make your LISP use the ENTLAST command inside of your loop to select the block and re-attribute it.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;There are sample LISP files installed with AutoCAD which can do much of this.&lt;/P&gt;</description>
      <pubDate>Thu, 21 Jul 2022 20:35:01 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/dynamic-blocks-forum/adding-dynamic-block-from-excel-file/m-p/11312471#M7126</guid>
      <dc:creator>jvasUUKFX</dc:creator>
      <dc:date>2022-07-21T20:35:01Z</dc:date>
    </item>
    <item>
      <title>Re: Adding dynamic block from excel file</title>
      <link>https://forums.autodesk.com/t5/dynamic-blocks-forum/adding-dynamic-block-from-excel-file/m-p/11320024#M7127</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;you need learn VBA programing for that not lisp&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 26 Jul 2022 06:52:12 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/dynamic-blocks-forum/adding-dynamic-block-from-excel-file/m-p/11320024#M7127</guid>
      <dc:creator>DumR0</dc:creator>
      <dc:date>2022-07-26T06:52:12Z</dc:date>
    </item>
    <item>
      <title>Re: Adding dynamic block from excel file</title>
      <link>https://forums.autodesk.com/t5/dynamic-blocks-forum/adding-dynamic-block-from-excel-file/m-p/11320766#M7128</link>
      <description>&lt;P&gt;Not exactly true.&amp;nbsp; They don't need to learn VBA.&amp;nbsp; It's just a lot easier for dynamic blocks.&amp;nbsp; But there are things that LISP does better than VBA.&amp;nbsp; And block attribute handling is one.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;VisualLISP handles dynamic blocks, clumsily.&amp;nbsp; The best documentation for VLISP commands affecting dynamic block properties are actually found on the Bricsys website for BricsCAD (&lt;A href="https://developer.bricsys.com/bricscad/help/en_US/V22/DevRef/index.html" target="_blank"&gt;https://developer.bricsys.com/bricscad/help/en_US/V22/DevRef/index.html&lt;/A&gt;)&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;The following line is a simple (&lt;EM&gt;and I use the term relatively&lt;/EM&gt;) example of how to get a dynamic property (vla-getdynamicblockproperties) from a block (stored in variable "venam") and sets that value to a variable (pblst) for later use:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;(setq pblst (vlax-variant-value (vlax-get-property (nth 0 (vlax-safearray-&amp;gt;list (vlax-variant-value (vla-getdynamicblockproperties venam)))) "Value")))&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Setting dynamic block values is much more complicated, because you need to know how to create and modify safe-array objects.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;In OP's situation, I suspect that the block definition already exists and they are simply setting attribute values.&amp;nbsp; So, this wouldn't be an issue.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 26 Jul 2022 12:58:17 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/dynamic-blocks-forum/adding-dynamic-block-from-excel-file/m-p/11320766#M7128</guid>
      <dc:creator>jvasUUKFX</dc:creator>
      <dc:date>2022-07-26T12:58:17Z</dc:date>
    </item>
  </channel>
</rss>

