<?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: Passing Values to Entmake ATTDEF in Visual LISP, AutoLISP and General Customization Forum</title>
    <link>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/passing-values-to-entmake-attdef/m-p/9250982#M79629</link>
    <description>&lt;BLOCKQUOTE&gt;&lt;HR /&gt;&lt;a href="https://forums.autodesk.com/t5/user/viewprofilepage/user-id/70249"&gt;@mgorecki&lt;/a&gt;&amp;nbsp;wrote:&lt;BR /&gt;&lt;P&gt;Hello,&lt;/P&gt;&lt;P&gt;I'm just not sure what's going on with this and I hope a second set of eyes will help.&lt;/P&gt;&lt;P&gt;I have some code that's supposed to create a block that contains an attribute.&lt;/P&gt;&lt;P&gt;This is my code, but it's not working.&amp;nbsp; I think it fails at "(cons 2 tagName)".&lt;/P&gt;&lt;P&gt;I'm not sure if it's because of the combination of hard code and the variables.&amp;nbsp; If so, how do you use both methods in the same entmake?&lt;/P&gt;&lt;PRE&gt;(setq blockName "Test1"&lt;BR /&gt;      insPt '(0.0 0.0 0.0)&lt;BR /&gt;      tagName "TAG_NAME"&lt;BR /&gt;      vis 0&lt;BR /&gt;      justifyHor 0)&lt;BR /&gt;
 (entmake
  (list
   (cons 0 "BLOCK")
   (cons 2 blockName)
   (cons 10 '(0.0 0.0 0.0))
   (cons 70 2)
  )
 )
 (entmake
  (list
   '(0 . "ATTDEF")
   '(1 . "")
   (cons 2 tagName)
   '(3 . "Enter Value")
   '(7 . "RomanS")
   '(8 . "DIM_1")
   (cons 10 insPt)
   (cons 11 insPt)
   '(40 . 2.20)
   (cons 71 vis) ;0=visible, 1=invisible
   (cons 72 justifyHor) ;0=Left, 1=Center, 2=Right
   '(74 . 2) ;2=Middle
  )
 )
 (entmake
  (list
   (cons 0 "ENDBLK")
   (cons 8 "0")
  )
 )&lt;/PRE&gt;&lt;P&gt;Thanks,&lt;/P&gt;&lt;P&gt;Mark&lt;/P&gt;&lt;HR /&gt;&lt;/BLOCKQUOTE&gt;&lt;PRE&gt;(cons 0 "BLOCK")&lt;/PRE&gt;&lt;P&gt;should be&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;(cons 0 "INSERT") or '(0 . "INSERT")&lt;/PRE&gt;</description>
    <pubDate>Tue, 14 Jan 2020 23:50:44 GMT</pubDate>
    <dc:creator>dlanorh</dc:creator>
    <dc:date>2020-01-14T23:50:44Z</dc:date>
    <item>
      <title>Passing Values to Entmake ATTDEF</title>
      <link>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/passing-values-to-entmake-attdef/m-p/9250926#M79627</link>
      <description>&lt;P&gt;Hello,&lt;/P&gt;&lt;P&gt;I'm just not sure what's going on with this and I hope a second set of eyes will help.&lt;/P&gt;&lt;P&gt;I have some code that's supposed to create a block that contains an attribute.&lt;/P&gt;&lt;P&gt;This is my code, but it's not working.&amp;nbsp; I think it fails at "(cons 2 tagName)".&lt;/P&gt;&lt;P&gt;I'm not sure if it's because of the combination of hard code and the variables.&amp;nbsp; If so, how do you use both methods in the same entmake?&lt;/P&gt;&lt;PRE&gt;(setq blockName "Test1"&lt;BR /&gt;      insPt '(0.0 0.0 0.0)&lt;BR /&gt;      tagName "TAG_NAME"&lt;BR /&gt;      vis 0&lt;BR /&gt;      justifyHor 0)&lt;BR /&gt;
 (entmake
  (list
   (cons 0 "BLOCK")
   (cons 2 blockName)
   (cons 10 '(0.0 0.0 0.0))
   (cons 70 2)
  )
 )
 (entmake
  (list
   '(0 . "ATTDEF")
   '(1 . "")
   (cons 2 tagName)
   '(3 . "Enter Value")
   '(7 . "RomanS")
   '(8 . "DIM_1")
   (cons 10 insPt)
   (cons 11 insPt)
   '(40 . 2.20)
   (cons 71 vis) ;0=visible, 1=invisible
   (cons 72 justifyHor) ;0=Left, 1=Center, 2=Right
   '(74 . 2) ;2=Middle
  )
 )
 (entmake
  (list
   (cons 0 "ENDBLK")
   (cons 8 "0")
  )
 )&lt;/PRE&gt;&lt;P&gt;Thanks,&lt;/P&gt;&lt;P&gt;Mark&lt;/P&gt;</description>
      <pubDate>Tue, 14 Jan 2020 23:00:31 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/passing-values-to-entmake-attdef/m-p/9250926#M79627</guid>
      <dc:creator>mgorecki</dc:creator>
      <dc:date>2020-01-14T23:00:31Z</dc:date>
    </item>
    <item>
      <title>Betreff: Passing Values to Entmake ATTDEF</title>
      <link>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/passing-values-to-entmake-attdef/m-p/9250950#M79628</link>
      <description>&lt;P&gt;Create an attdef by hand with TAG,PROMPT and VALUE,&lt;/P&gt;
&lt;P&gt;check the properties by (entget(car(entsel))) and you will see: gc2 is the TAG, gc3 is the PROMPT, gc1 is the predefined value.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;A href="http://help.autodesk.com/view/ACD/2020/ENU/?guid=GUID-F0EA099B-6F88-4BCC-BEC7-247BA64838A4" target="_blank" rel="noopener"&gt;Or read the Help about ATTDEF (DXF)&lt;/A&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;HTH&lt;/P&gt;</description>
      <pubDate>Tue, 14 Jan 2020 23:19:24 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/passing-values-to-entmake-attdef/m-p/9250950#M79628</guid>
      <dc:creator>cadffm</dc:creator>
      <dc:date>2020-01-14T23:19:24Z</dc:date>
    </item>
    <item>
      <title>Re: Passing Values to Entmake ATTDEF</title>
      <link>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/passing-values-to-entmake-attdef/m-p/9250982#M79629</link>
      <description>&lt;BLOCKQUOTE&gt;&lt;HR /&gt;&lt;a href="https://forums.autodesk.com/t5/user/viewprofilepage/user-id/70249"&gt;@mgorecki&lt;/a&gt;&amp;nbsp;wrote:&lt;BR /&gt;&lt;P&gt;Hello,&lt;/P&gt;&lt;P&gt;I'm just not sure what's going on with this and I hope a second set of eyes will help.&lt;/P&gt;&lt;P&gt;I have some code that's supposed to create a block that contains an attribute.&lt;/P&gt;&lt;P&gt;This is my code, but it's not working.&amp;nbsp; I think it fails at "(cons 2 tagName)".&lt;/P&gt;&lt;P&gt;I'm not sure if it's because of the combination of hard code and the variables.&amp;nbsp; If so, how do you use both methods in the same entmake?&lt;/P&gt;&lt;PRE&gt;(setq blockName "Test1"&lt;BR /&gt;      insPt '(0.0 0.0 0.0)&lt;BR /&gt;      tagName "TAG_NAME"&lt;BR /&gt;      vis 0&lt;BR /&gt;      justifyHor 0)&lt;BR /&gt;
 (entmake
  (list
   (cons 0 "BLOCK")
   (cons 2 blockName)
   (cons 10 '(0.0 0.0 0.0))
   (cons 70 2)
  )
 )
 (entmake
  (list
   '(0 . "ATTDEF")
   '(1 . "")
   (cons 2 tagName)
   '(3 . "Enter Value")
   '(7 . "RomanS")
   '(8 . "DIM_1")
   (cons 10 insPt)
   (cons 11 insPt)
   '(40 . 2.20)
   (cons 71 vis) ;0=visible, 1=invisible
   (cons 72 justifyHor) ;0=Left, 1=Center, 2=Right
   '(74 . 2) ;2=Middle
  )
 )
 (entmake
  (list
   (cons 0 "ENDBLK")
   (cons 8 "0")
  )
 )&lt;/PRE&gt;&lt;P&gt;Thanks,&lt;/P&gt;&lt;P&gt;Mark&lt;/P&gt;&lt;HR /&gt;&lt;/BLOCKQUOTE&gt;&lt;PRE&gt;(cons 0 "BLOCK")&lt;/PRE&gt;&lt;P&gt;should be&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;(cons 0 "INSERT") or '(0 . "INSERT")&lt;/PRE&gt;</description>
      <pubDate>Tue, 14 Jan 2020 23:50:44 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/passing-values-to-entmake-attdef/m-p/9250982#M79629</guid>
      <dc:creator>dlanorh</dc:creator>
      <dc:date>2020-01-14T23:50:44Z</dc:date>
    </item>
    <item>
      <title>Re: Passing Values to Entmake ATTDEF</title>
      <link>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/passing-values-to-entmake-attdef/m-p/9251056#M79630</link>
      <description>&lt;BLOCKQUOTE&gt;&lt;HR /&gt;&lt;a href="https://forums.autodesk.com/t5/user/viewprofilepage/user-id/5644077"&gt;@dlanorh&lt;/a&gt;&amp;nbsp; schrieb:&lt;BR /&gt;
&lt;BLOCKQUOTE&gt;&lt;HR /&gt;&lt;HR /&gt;&lt;/BLOCKQUOTE&gt;
&lt;PRE&gt;(cons 0 "BLOCK")&lt;/PRE&gt;
&lt;P&gt;should be&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;(cons 0 "INSERT") or '(0 . "INSERT")&lt;/PRE&gt;
&lt;HR /&gt;&lt;/BLOCKQUOTE&gt;
&lt;P&gt;Why? we try to create a block with an attdef, not a insert - it's late, i now &lt;span class="lia-unicode-emoji" title=":grinning_face_with_smiling_eyes:"&gt;😄&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;a href="https://forums.autodesk.com/t5/user/viewprofilepage/user-id/70249"&gt;@mgorecki&lt;/a&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;1. i totally missunderstood the topic/the issue.&lt;/P&gt;
&lt;P&gt;2. i oversaw the dxf code 1 in your code&lt;/P&gt;
&lt;P&gt;-- it is late -- sorry&lt;/P&gt;
&lt;P&gt;Answer: Acad misses the dxf70&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt; (entmake
  (list
   '(0 . "ATTDEF")
   '(1 . "")
   (cons 2 tagName)
   '(3 . "Enter Value")
   '(7 . "RomanS")
   '(8 . "DIM_1")
   (cons 10 insPt)
   (cons 11 insPt)
   '(40 . 2.20)
   '(70 . 0) ; http://help.autodesk.com/view/ACD/2020/ENU/?guid=GUID-F0EA099B-6F88-4BCC-BEC7-247BA64838A4
   (cons 71 vis) ;0=visible, 1=invisible
   (cons 72 justifyHor) ;0=Left, 1=Center, 2=Right
   '(74 . 2) ;2=Middle
  )&lt;/PRE&gt;
&lt;P&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 15 Jan 2020 00:57:48 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/passing-values-to-entmake-attdef/m-p/9251056#M79630</guid>
      <dc:creator>cadffm</dc:creator>
      <dc:date>2020-01-15T00:57:48Z</dc:date>
    </item>
    <item>
      <title>Re: Passing Values to Entmake ATTDEF</title>
      <link>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/passing-values-to-entmake-attdef/m-p/9252589#M79631</link>
      <description>&lt;P&gt;Hello CADffm,&lt;/P&gt;&lt;P&gt;I added the '(70 . 0) but unfortunately it still didn't work.&amp;nbsp; Then the crazy thing; I re-formatted the way I wrote it (based on another program I had written):&lt;/P&gt;&lt;PRE&gt;(entmake (list (cons 0 "BLOCK")
		(cons 2 blockName)
		(cons 10 '(0.0 0.0 0.0))
		(cons 70 2)
		))
 (entmake (list (cons 0 "ATTDEF")
                (cons 1 "")
                (cons 2 tagName)
                (cons 3 "Enter Value")
                (cons 8 "DIM_1")
                (cons 10 '(0.0 0.0 0.0))
                (cons 11 '(0.0 0.0 0.0))
                (cons 70 0) ;Attribute flags, 1 = Attribute is invisible
                (cons 72 1) ;Horizontal text justification, 1 = Center
                (cons 74 2) ;Vertical text justification, 2 = Middle
                (cons 40 2.20)
		))
 (entmake (list (cons 0 "ENDBLK")
		(cons 8 "0")
		))&lt;/PRE&gt;&lt;P&gt;That works just fine.&amp;nbsp;I don't know why that would when the other didn't, but hey I'll take it. &lt;span class="lia-unicode-emoji" title=":slightly_smiling_face:"&gt;🙂&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Best regards,&lt;/P&gt;&lt;P&gt;Mark&lt;/P&gt;</description>
      <pubDate>Wed, 15 Jan 2020 15:56:04 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/passing-values-to-entmake-attdef/m-p/9252589#M79631</guid>
      <dc:creator>mgorecki</dc:creator>
      <dc:date>2020-01-15T15:56:04Z</dc:date>
    </item>
    <item>
      <title>Re: Passing Values to Entmake ATTDEF</title>
      <link>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/passing-values-to-entmake-attdef/m-p/9252930#M79632</link>
      <description>&lt;BLOCKQUOTE&gt;&lt;HR /&gt;&lt;a href="https://forums.autodesk.com/t5/user/viewprofilepage/user-id/70249"&gt;@mgorecki&lt;/a&gt;&amp;nbsp; schrieb:&lt;BR /&gt;
&lt;P&gt;I added the '(70 . 0) but unfortunately it still didn't work.&amp;nbsp; Then the crazy thing; I re-formatted the way I&lt;/P&gt;
&lt;P&gt;&amp;nbsp;I don't know why that would when the other didn't, but hey I'll take it. &lt;span class="lia-unicode-emoji" title=":slightly_smiling_face:"&gt;🙂&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;HR /&gt;&lt;/BLOCKQUOTE&gt;
&lt;P&gt;It works with "I added the '(70 . 0) ", there was another temporary problem in this second of your try.&lt;/P&gt;
&lt;P&gt;One hint: You should use the original group code order so long it is easy possible for you - like in this case here!&lt;/P&gt;
&lt;P&gt;Because often the order is not important, but often means too: Sometimes the groupcode order is important.&lt;/P&gt;</description>
      <pubDate>Wed, 15 Jan 2020 18:17:38 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/passing-values-to-entmake-attdef/m-p/9252930#M79632</guid>
      <dc:creator>cadffm</dc:creator>
      <dc:date>2020-01-15T18:17:38Z</dc:date>
    </item>
  </channel>
</rss>

