<?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: How to copy a dictionary from one entity to a new one? in Visual LISP, AutoLISP and General Customization Forum</title>
    <link>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/how-to-copy-a-dictionary-from-one-entity-to-a-new-one/m-p/10467562#M58208</link>
    <description>&lt;P&gt;on the post&amp;nbsp;&lt;A href="https://www.cadtutor.net/forum/topic/73385-how-to-copy-a-dictionary-from-one-entity-to-a-new-one/" target="_blank" rel="noopener"&gt;CadTutor&lt;/A&gt;&amp;nbsp;Roy_043 give us the insight to solve the problem.&amp;nbsp;&lt;SPAN&gt;Two entities cannot reference the same extension dictionary&lt;/SPAN&gt;&lt;SPAN&gt;. Do only thing I changed is order in the loop from:&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;-Collect data from the point -&amp;gt; entmake new block -&amp;gt;&amp;nbsp;delete point&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;to&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;-Collect data from the point -&amp;gt; delete point -&amp;gt; entmake new block&lt;/SPAN&gt;&lt;/P&gt;</description>
    <pubDate>Wed, 14 Jul 2021 08:49:51 GMT</pubDate>
    <dc:creator>nwbos</dc:creator>
    <dc:date>2021-07-14T08:49:51Z</dc:date>
    <item>
      <title>How to copy a dictionary from one entity to a new one?</title>
      <link>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/how-to-copy-a-dictionary-from-one-entity-to-a-new-one/m-p/10465008#M58204</link>
      <description>&lt;P&gt;We've build a lisp code to replace imported Arcgis points to the correct cad block defined by our national standard.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;We do this by creating a new block using entmake:&lt;/P&gt;&lt;LI-CODE lang="lisp"&gt;(setq $entList (list 
                '(0 . "INSERT")
                (cons 2 $bname)
                ;  (cons 8 $lName)
                (assoc 8 $entSelect)
                (cons 10 $inspt)
                (cons 41 1)
                (cons 42 1)
                (cons 43 1)
                (cons 50 (* $rotang (/ pi 180)))
                (assoc 210 $entSelect)
                '(102 . "{ACAD_XDICTIONARY")
                (assoc 360 $entSelect)
                '(102 . "}")
             )
)

(setq $entityName (entmake $entList))&lt;/LI-CODE&gt;&lt;DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;all the properties added correctly, except for the "ACAD_XDICTIONARY"&amp;nbsp; with assoc 360&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;What are we missing?&amp;nbsp; any ideas?&amp;nbsp;&lt;/DIV&gt;&lt;/DIV&gt;</description>
      <pubDate>Tue, 13 Jul 2021 13:19:52 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/how-to-copy-a-dictionary-from-one-entity-to-a-new-one/m-p/10465008#M58204</guid>
      <dc:creator>nwbos</dc:creator>
      <dc:date>2021-07-13T13:19:52Z</dc:date>
    </item>
    <item>
      <title>Re: How to copy a dictionary from one entity to a new one?</title>
      <link>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/how-to-copy-a-dictionary-from-one-entity-to-a-new-one/m-p/10465259#M58205</link>
      <description>&lt;P&gt;Post a sample DWG with (some) point(s) that have dictionary data assigned, and DWG with your block you are trying to replace point(s) with.&lt;/P&gt;</description>
      <pubDate>Tue, 13 Jul 2021 14:23:43 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/how-to-copy-a-dictionary-from-one-entity-to-a-new-one/m-p/10465259#M58205</guid>
      <dc:creator>marko_ribar</dc:creator>
      <dc:date>2021-07-13T14:23:43Z</dc:date>
    </item>
    <item>
      <title>Re: How to copy a dictionary from one entity to a new one?</title>
      <link>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/how-to-copy-a-dictionary-from-one-entity-to-a-new-one/m-p/10465308#M58206</link>
      <description>&lt;P&gt;it's a question about function defined on line 752. Block replacement works fine. But on line 930, 931 en 932 we want to add te dict from the points. If i print $entList it shows the values in console. But when put in entmake it doesnt contain the data.&lt;/P&gt;</description>
      <pubDate>Tue, 13 Jul 2021 14:41:09 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/how-to-copy-a-dictionary-from-one-entity-to-a-new-one/m-p/10465308#M58206</guid>
      <dc:creator>nwbos</dc:creator>
      <dc:date>2021-07-13T14:41:09Z</dc:date>
    </item>
    <item>
      <title>Re: How to copy a dictionary from one entity to a new one?</title>
      <link>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/how-to-copy-a-dictionary-from-one-entity-to-a-new-one/m-p/10465799#M58207</link>
      <description>&lt;P&gt;I don't know how to help you for now... Your layer on which points reside is somehow unaccessable for other entities than points that are in it... Maybe its due to its name which is with "*" in front and proceeds with long description and it don't behaves like ordinary layers... It is also frozen and doesn't have XDICTIONARY reference like layer "0", so this is only thing that is somewhat usual, but else is very strange... I suppose that it was created by some other process and not in ordinary way ACAD creates layers... All I could do it thaw it, and points that are in it couldn't change layer to something different... You can also see that when you copy point, it automatically gets those XDICTIONARY entry different than source point... So something with this layer IMHO is preventing other objects to inherit its properties including your blocks from points XDICTIONARY - it's reserved only for points that were generated inside it... I've noticed that you placed wrongly (ssget) filter in your posted lisp - should have '(8 . "*ESRI...) - "*" in front was missing... Yes, blocks are generated, but their layername wasn't inherited from points too, beside not obtaining XDICTIONARY data... I don't know for now, further investigations are needed...&lt;/P&gt;&lt;P&gt;This simple code is for thawing points layer, but nothing else, so it's pretty useless - only for researching tasks it may be perhaps good...&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;(defun c:thaw-pts-layer ( / ss lay i e ex )
  (setq ss (ssget "_X" '((0 . "POINT"))))
  (setq lay (tblobjname "LAYER" (cdr (assoc 8 (entget (ssname ss 0))))))
  (entmod (subst (cons 70 0) (assoc 70 (entget lay)) (entget lay)))
  (repeat (setq i (sslength ss))
    (setq e (ssname ss (setq i (1- i))))
    (setq ex (entget e))
    (setq ex (subst (cons 8 "Defpoints") (assoc 8 ex) ex))
    (entupd (cdr (assoc -1 (entmod ex))))
  )
  (princ)
)&lt;/LI-CODE&gt;</description>
      <pubDate>Tue, 13 Jul 2021 17:08:27 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/how-to-copy-a-dictionary-from-one-entity-to-a-new-one/m-p/10465799#M58207</guid>
      <dc:creator>marko_ribar</dc:creator>
      <dc:date>2021-07-13T17:08:27Z</dc:date>
    </item>
    <item>
      <title>Re: How to copy a dictionary from one entity to a new one?</title>
      <link>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/how-to-copy-a-dictionary-from-one-entity-to-a-new-one/m-p/10467562#M58208</link>
      <description>&lt;P&gt;on the post&amp;nbsp;&lt;A href="https://www.cadtutor.net/forum/topic/73385-how-to-copy-a-dictionary-from-one-entity-to-a-new-one/" target="_blank" rel="noopener"&gt;CadTutor&lt;/A&gt;&amp;nbsp;Roy_043 give us the insight to solve the problem.&amp;nbsp;&lt;SPAN&gt;Two entities cannot reference the same extension dictionary&lt;/SPAN&gt;&lt;SPAN&gt;. Do only thing I changed is order in the loop from:&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;-Collect data from the point -&amp;gt; entmake new block -&amp;gt;&amp;nbsp;delete point&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;to&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;-Collect data from the point -&amp;gt; delete point -&amp;gt; entmake new block&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Wed, 14 Jul 2021 08:49:51 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/how-to-copy-a-dictionary-from-one-entity-to-a-new-one/m-p/10467562#M58208</guid>
      <dc:creator>nwbos</dc:creator>
      <dc:date>2021-07-14T08:49:51Z</dc:date>
    </item>
    <item>
      <title>Re: How to copy a dictionary from one entity to a new one?</title>
      <link>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/how-to-copy-a-dictionary-from-one-entity-to-a-new-one/m-p/10467622#M58209</link>
      <description>&lt;P&gt;Yes, XDICTIONARY is inherited, but source layer "*ESRI..." isn't... If that doesn't borther you, it's all fine, I hope...&lt;/P&gt;</description>
      <pubDate>Wed, 14 Jul 2021 09:18:41 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/how-to-copy-a-dictionary-from-one-entity-to-a-new-one/m-p/10467622#M58209</guid>
      <dc:creator>marko_ribar</dc:creator>
      <dc:date>2021-07-14T09:18:41Z</dc:date>
    </item>
    <item>
      <title>Re: How to copy a dictionary from one entity to a new one?</title>
      <link>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/how-to-copy-a-dictionary-from-one-entity-to-a-new-one/m-p/10467718#M58210</link>
      <description>&lt;P&gt;Futher more, I can't find a way how to get rid of damned "*ESRI..." layer where points were placed... (ssget "X" '((8 . "*ESRI..."))) is empty, but still maybe there are some things (ssget) can't find/select... I've noticed that there are some proxy entities in DWG... Maybe those should be removed too... There are some plugins for that on Exchange Apps site, but never tried...&lt;/P&gt;</description>
      <pubDate>Wed, 14 Jul 2021 10:00:00 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/how-to-copy-a-dictionary-from-one-entity-to-a-new-one/m-p/10467718#M58210</guid>
      <dc:creator>marko_ribar</dc:creator>
      <dc:date>2021-07-14T10:00:00Z</dc:date>
    </item>
    <item>
      <title>Re: How to copy a dictionary from one entity to a new one?</title>
      <link>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/how-to-copy-a-dictionary-from-one-entity-to-a-new-one/m-p/10467927#M58211</link>
      <description>&lt;P&gt;The *ESRI layers are needed for return the proces. When after edited by engineers(they are used to our national CAD standards) we can convert it back to ESRI layers. After that we can use the ESRI plugin again to write changes back to our GIS system.&lt;/P&gt;</description>
      <pubDate>Wed, 14 Jul 2021 11:24:38 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/how-to-copy-a-dictionary-from-one-entity-to-a-new-one/m-p/10467927#M58211</guid>
      <dc:creator>nwbos</dc:creator>
      <dc:date>2021-07-14T11:24:38Z</dc:date>
    </item>
    <item>
      <title>Re: How to copy a dictionary from one entity to a new one?</title>
      <link>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/how-to-copy-a-dictionary-from-one-entity-to-a-new-one/m-p/10468286#M58212</link>
      <description>&lt;BLOCKQUOTE&gt;&lt;HR /&gt;&lt;a href="https://forums.autodesk.com/t5/user/viewprofilepage/user-id/5292341"&gt;@nwbos&lt;/a&gt;&amp;nbsp;wrote:&lt;BR /&gt;&lt;P&gt;The *ESRI layers are needed for return the proces. When after edited by engineers(they are used to our national CAD standards) we can convert it back to ESRI layers. After that we can use the ESRI plugin again to write changes back to our GIS system.&lt;/P&gt;&lt;HR /&gt;&lt;/BLOCKQUOTE&gt;&lt;P&gt;Nevertheless, layer(s) that aren't referenced by some other DWG, or something else, and are different than main "0" layer and can't be deleted, purged or removed by any known action are "BAD" layer(s) IMHO...&lt;/P&gt;&lt;P&gt;After whole procedure with engineers and other persons involved in project is finished, it would be best if sufficient stuff are removed and purged in order to make project more usable in some other situations that may arise in near or distant future...&lt;/P&gt;&lt;P&gt;You may agree or not, but those are the facts, not just my remarks. If you tend to leave project(s) always in working process and don't optimize each phase, final result could carry data that may be potential source(s) of confilicts if informations are superponing or memory is overloaded...&lt;/P&gt;&lt;P&gt;Further more, you would be forced to work slow and unefficient if size of DWG file or other used files are unusually big, or carry data that are not needed in work so that even small intervention(s) may cause instability, errors, crashing, difficulties, waste of time and loosing data in unpredicted ways that may occur making working process problematic and project unfinished or badly done...&lt;/P&gt;&lt;P&gt;So, consider that removing things like harmful stuff or strange unusual elements in some process or project is not a bad, but good approach and may give you and others more benefits than lacks... This could speed things and make situations more predictable and user friendly allowing things to be quickly improved, problems and dificulties overcomed giving better results, correct and healthy implementation and projects successfully done and finished.&lt;/P&gt;</description>
      <pubDate>Wed, 14 Jul 2021 13:21:52 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/how-to-copy-a-dictionary-from-one-entity-to-a-new-one/m-p/10468286#M58212</guid>
      <dc:creator>marko_ribar</dc:creator>
      <dc:date>2021-07-14T13:21:52Z</dc:date>
    </item>
  </channel>
</rss>

