<?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: Entmake Block Definition Woes in Visual LISP, AutoLISP and General Customization Forum</title>
    <link>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/entmake-block-definition-woes/m-p/11930615#M30925</link>
    <description>&lt;P&gt;&lt;a href="https://forums.autodesk.com/t5/user/viewprofilepage/user-id/467606"&gt;@charmingladyfool&lt;/a&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;You are no fool.&amp;nbsp; Thanks for pointing that out.&lt;/P&gt;
&lt;P&gt;I put the naked entmake in there for a purpose...&lt;/P&gt;
&lt;P&gt;It stops any previous entmake that may have been under construction.&lt;/P&gt;
&lt;P&gt;I'd sure be surprised to have created an attribute attached to a polyline or some other kind of morph.&lt;/P&gt;</description>
    <pubDate>Sat, 29 Apr 2023 18:28:14 GMT</pubDate>
    <dc:creator>john.uhden</dc:creator>
    <dc:date>2023-04-29T18:28:14Z</dc:date>
    <item>
      <title>Entmake Block Definition Woes</title>
      <link>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/entmake-block-definition-woes/m-p/11920861#M30919</link>
      <description>&lt;P&gt;What am I doing wrong?&amp;nbsp; This used to work (in the 90's).&lt;BR /&gt;I've added oks to focus on which statement had failed, but it makes it all the way through without succeeding.&lt;BR /&gt;Ignore the pipe symbol "|" that prefixes symbol names.&amp;nbsp; This started in the days when locals weren't local at all, so I had to identify them to set them to nil.&lt;/P&gt;
&lt;LI-CODE lang="general"&gt;   ;;----------------------------------------------------------------
   ;; This function creates the "SPOT" block definition, and
   ;; the text style "SIMPLEX" used by the block's "ELEV" attribute:
   ;; (09-23-03) changed "ELEV" attribute to layer "0"  and "BYBLOCK"
   ;;            at request of LGA
   ;;            Also changed justification to "ML"
   ;;
   (defun @Anonymous_def ( / |style)
      (if (setq |style (tblsearch "STYLE" "SIMPLEX"))
         (if (or
            (/= (strcase (cdr (assoc 3 |style))) "SIMPLEX")
            (/= (cdr (assoc 40 |style)) 0.0) ; fixed height
            (/= (cdr (assoc 41 |style)) 1.0) ; width factor
            (/= (cdr (assoc 50 |style)) 0.0) ; obliquing angle
            (= (logand (cdr (assoc 70 |style)) 4) 4)   ; flag
            (/= (cdr (assoc 71 |style)) 0))  ; generation flags
            (command "_.style" "SIMPLEX" "simplex" 0.0 1.0 0.0 "_N" "_N" "_N")
         )
         (command "_.style" "SIMPLEX" "simplex" 0.0 1.0 0.0 "_N" "_N" "_N")
      )
(setq ok 99)
      (entmake)
(setq ok 100)
      (entmake
        '((0 . "BLOCK") (2 . "SPOT") (70 . 2) (10 0.0 0.0 0.0))
      )
(setq ok 101)
      (entmake
        '((0 . "TEXT") (8 . "0") (10 0.0 0.0 0.0) (210 0.0 0.0 1.0) (1 . "+") (40 . 0.0833333333) (50 . 0.785398)(62 . 0)
         (71 . 0) (72 . 4) (73 . 0)) ;; Middle
      )
(setq ok 102)
      (entmake
        '((0 . "ATTDEF") (8 . "0") ;(100 . "AcDbEntity") (100 . "AcDbText")
          (10 0.12 0.0 0.0) (11 0.12 0.0 0.0) ;(100 . "AcDbAttribute")
          (40 . 0.0833333) (1 . "") (3 . "Elev") (2 . "ELEV")
          (73 . 0) (50 . 0.0) (41 . 1.0) (51 . 0.0) (7 . "SIMPLEX")
          (62 . 0)(71 . 0) (72 . 4) (210 0.0 0.0 1.0) (73 . 0)) ;; Middle, NOT Middle Center
      )
(setq ok 103)
      (entmake '((0 . "ENDBLK")))
   )
 &lt;/LI-CODE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 25 Apr 2023 16:17:21 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/entmake-block-definition-woes/m-p/11920861#M30919</guid>
      <dc:creator>john.uhden</dc:creator>
      <dc:date>2023-04-25T16:17:21Z</dc:date>
    </item>
    <item>
      <title>Re: Entmake Block Definition Woes</title>
      <link>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/entmake-block-definition-woes/m-p/11920923#M30920</link>
      <description>&lt;P&gt;I think you're missing some data in the&amp;nbsp;(0 . "BLOCK") and&amp;nbsp;(0 . "ENDBLK") sections. Here's a quick example that creates an attributed block.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;LI-CODE lang="lisp"&gt;(defun c:foo nil
  (cond	((null (tblobjname "block" "123"))
	 (entmake '((0 . "BLOCK")
		    (100 . "AcDbEntity")
		    (67 . 0)
		    (8 . "0")
		    (100 . "AcDbBlockReference")
		    (66 . 1)
		    (2 . "123")
		    (10 0. 0. 0.)
		    (70 . 2)
		   )
	 )
	 (entmake '((0 . "CIRCLE")
		    (100 . "AcDbEntity")
		    (67 . 0)
		    (8 . "0")
		    (100 . "AcDbCircle")
		    (10 0. 0. 0.)
		    (40 . 1.)
		   )
	 )
	 (entmake '((0 . "ATTDEF")
		    (100 . "AcDbEntity")
		    (67 . 0)
		    (8 . "0")
		    (100 . "AcDbText")
		    (10 -0.166666666666667 -0.25 0.)
		    (40 . 0.5)
		    (1 . "0")
		    (50 . 0.)
		    (41 . 1.)
		    (51 . 0.)
		    (71 . 0)
		    (72 . 1)
		    (11 0. 0. 0.)
		    (100 . "AcDbAttributeDefinition")
		    (280 . 0)
		    (3 . "123")
		    (2 . "123")
		    (70 . 8)
		    (73 . 0)
		    (74 . 2)
		    (280 . 1)
		   )
	 )
	 (entmake '((0 . "ENDBLK") (100 . "AcDbBlockEnd") (8 . "0")))
	)
  )
  (princ)
)
&lt;/LI-CODE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;You can also entmake your Simplex style &lt;span class="lia-unicode-emoji" title=":slightly_smiling_face:"&gt;🙂&lt;/span&gt;&lt;/P&gt;
&lt;LI-CODE lang="lisp"&gt;(entmake '((0 . "STYLE")
	   (100 . "AcDbSymbolTableRecord")
	   (100 . "AcDbTextStyleTableRecord")
	   (2 . "Simplex")
	   (70 . 0)
	   (40 . 0.0)
	   (41 . 1.0)
	   (50 . 0.0)
	   (71 . 0)
	   (42 . 0.125)
	   (3 . "simplex.shx")
	   (4 . "")
	  )
)&lt;/LI-CODE&gt;</description>
      <pubDate>Tue, 25 Apr 2023 16:47:19 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/entmake-block-definition-woes/m-p/11920923#M30920</guid>
      <dc:creator>ronjonp</dc:creator>
      <dc:date>2023-04-25T16:47:19Z</dc:date>
    </item>
    <item>
      <title>Re: Entmake Block Definition Woes</title>
      <link>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/entmake-block-definition-woes/m-p/11921022#M30921</link>
      <description>&lt;P&gt;This should work&lt;/P&gt;&lt;LI-CODE lang="general"&gt;(defun @Anonymous_DEF ( / )
  (if (not (tblsearch "STYLE" "SIMPLEX"))
    (entmake
      '(
      (0 . "STYLE")
      (100 . "AcDbSymbolTableRecord")
      (100 . "AcDbTextStyleTableRecord")
      (2 . "SIMPLEX")
      (70 . 0)
      (40 . 0.0)
      (41 . 1.0)
      (50 . 0.0)
      (71 . 0)
      (42 . 2.5)
      (3 . "simplex.shx")
      (4 . "")
      )
    )
  )
  (if (not (tblsearch "BLOCK" "SPOT"))
    (progn
      (entmake
        '((0 . "BLOCK") (2 . "SPOT") (70 . 2) (8 . "0") (62 . 256) (6 . "ByLayer") (370 . -2) (10 0.0 0.0 0.0))
      )
      (entmake
        '(
        (0 . "TEXT")
        (100 . "AcDbEntity")
        (67 . 0)
        (410 . "Model")
        (8 . "0")
        (62 . 0)
        (100 . "AcDbText")
        (10 0.0 0.0 0.0)
        (40 . 0.0833333333)
        (1 . "+")
        (50 . 0.785398)
        (41 . 1.0)
        (51 . 0.0)
        (7 . "Arial")
        (71 . 0)
        (72 . 4)
        (11 0.0 0.0 0.0)
        (210 0.0 0.0 1.0)
        (100 . "AcDbText")
        (73 . 0)
        )
      )
      (entmake
        '(
        (0 . "ATTDEF")
        (100 . "AcDbEntity")
        (67 . 0)
        (410 . "Model")
        (8 . "0")
        (62 . 0)
        (100 . "AcDbText")
        (10 0.0 0.0 0.0)
        (40 . 0.0833333)
        (1 . "")
        (50 . 0.0)
        (41 . 1.0)
        (51 . 0.0)
        (7 . "SIMPLEX")
        (71 . 0)
        (72 . 4)
        (11 0.0 0.0 0.0)
        (210 0.0 0.0 1.0)
        (100 . "AcDbAttributeDefinition")
        (280 . 0)
        (3 . "Elev")
        (2 . "ELEV")
        (70 . 0)
        (73 . 0)
        (74 . 0)
        (280 . 1)
        )
      )
      (entmake '((0 . "ENDBLK") (8 . "0") (62 . 256) (6 . "ByLayer") (370 . -2)))
    )
  )
)&lt;/LI-CODE&gt;</description>
      <pubDate>Tue, 25 Apr 2023 17:17:09 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/entmake-block-definition-woes/m-p/11921022#M30921</guid>
      <dc:creator>CADaSchtroumpf</dc:creator>
      <dc:date>2023-04-25T17:17:09Z</dc:date>
    </item>
    <item>
      <title>Re: Entmake Block Definition Woes</title>
      <link>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/entmake-block-definition-woes/m-p/11921274#M30922</link>
      <description>&lt;P&gt;&lt;a href="https://forums.autodesk.com/t5/user/viewprofilepage/user-id/524107"&gt;@CADaSchtroumpf&lt;/a&gt;&amp;nbsp;and&amp;nbsp;&lt;a href="https://forums.autodesk.com/t5/user/viewprofilepage/user-id/3930636"&gt;@john.uhden&lt;/a&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I personally don't entmake blocks with attributes. I've found they can be a bit wonky. Even the examples above look correct but when you open them in the block editor the attribute is invisible .. until you close and reopen the drawing. Also sometimes the font they were created with does not stick.&lt;/P&gt;</description>
      <pubDate>Tue, 25 Apr 2023 18:50:15 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/entmake-block-definition-woes/m-p/11921274#M30922</guid>
      <dc:creator>ronjonp</dc:creator>
      <dc:date>2023-04-25T18:50:15Z</dc:date>
    </item>
    <item>
      <title>Re: Entmake Block Definition Woes</title>
      <link>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/entmake-block-definition-woes/m-p/11921948#M30923</link>
      <description>&lt;P&gt;&lt;a href="https://forums.autodesk.com/t5/user/viewprofilepage/user-id/593837"&gt;@ronjonp&lt;/a&gt;&amp;nbsp;and&amp;nbsp;&lt;a href="https://forums.autodesk.com/t5/user/viewprofilepage/user-id/524107"&gt;@CADaSchtroumpf&lt;/a&gt;&amp;nbsp;,&lt;/P&gt;
&lt;P&gt;I guess that the 100 codes are required these days, where they weren't 30 years ago.&lt;/P&gt;
&lt;P&gt;I'll try out the additions.&lt;/P&gt;
&lt;P&gt;Meanwhile I made the block definition manually so I could move along.&lt;/P&gt;
&lt;P&gt;Thanks, guys.&lt;/P&gt;</description>
      <pubDate>Wed, 26 Apr 2023 02:21:54 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/entmake-block-definition-woes/m-p/11921948#M30923</guid>
      <dc:creator>john.uhden</dc:creator>
      <dc:date>2023-04-26T02:21:54Z</dc:date>
    </item>
    <item>
      <title>Re: Entmake Block Definition Woes</title>
      <link>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/entmake-block-definition-woes/m-p/11929790#M30924</link>
      <description>&lt;P&gt;Please check line number 22. You put (entmake)&amp;nbsp; without any list&lt;/P&gt;</description>
      <pubDate>Sat, 29 Apr 2023 03:10:15 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/entmake-block-definition-woes/m-p/11929790#M30924</guid>
      <dc:creator>charmingladyfool</dc:creator>
      <dc:date>2023-04-29T03:10:15Z</dc:date>
    </item>
    <item>
      <title>Re: Entmake Block Definition Woes</title>
      <link>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/entmake-block-definition-woes/m-p/11930615#M30925</link>
      <description>&lt;P&gt;&lt;a href="https://forums.autodesk.com/t5/user/viewprofilepage/user-id/467606"&gt;@charmingladyfool&lt;/a&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;You are no fool.&amp;nbsp; Thanks for pointing that out.&lt;/P&gt;
&lt;P&gt;I put the naked entmake in there for a purpose...&lt;/P&gt;
&lt;P&gt;It stops any previous entmake that may have been under construction.&lt;/P&gt;
&lt;P&gt;I'd sure be surprised to have created an attribute attached to a polyline or some other kind of morph.&lt;/P&gt;</description>
      <pubDate>Sat, 29 Apr 2023 18:28:14 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/entmake-block-definition-woes/m-p/11930615#M30925</guid>
      <dc:creator>john.uhden</dc:creator>
      <dc:date>2023-04-29T18:28:14Z</dc:date>
    </item>
  </channel>
</rss>

