<?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: Creating a hatch into a closed polyline with LISP in AutoCAD Forum</title>
    <link>https://forums.autodesk.com/t5/autocad-forum/creating-a-hatch-into-a-closed-polyline-with-lisp/m-p/8972361#M130665</link>
    <description>&lt;P&gt;This works here:&lt;/P&gt;
&lt;PRE&gt;(defun c:arrow	(/ ent)
  (command "_.pline" '(0 150) '(600 0) '(0 -150) "_c" "")
  (setq ENT (entlast))
  (command "_hatch" "SOLID" ENT "")
  (princ)
)&lt;/PRE&gt;</description>
    <pubDate>Sun, 18 Aug 2019 15:32:12 GMT</pubDate>
    <dc:creator>j.palmeL29YX</dc:creator>
    <dc:date>2019-08-18T15:32:12Z</dc:date>
    <item>
      <title>Creating a hatch into a closed polyline with LISP</title>
      <link>https://forums.autodesk.com/t5/autocad-forum/creating-a-hatch-into-a-closed-polyline-with-lisp/m-p/8972318#M130664</link>
      <description>&lt;P&gt;Dear all,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I want to create a hatch inside a closed polyline with Lisp. Unfortunaly it won't work. My Lisp Code:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;(defun FKT:ARROW ()&lt;/P&gt;&lt;P&gt;(command "_.pline" '(0 150) '(600 0) '(0 -150) "_c" "")&lt;/P&gt;&lt;P&gt;(setq ENT (entlast))&lt;/P&gt;&lt;P&gt;(command "_hatch" "SOLID" ENT "")&lt;/P&gt;&lt;P&gt;);defun&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I use AutoCAD 2017. Thanks for all your help.&lt;/P&gt;</description>
      <pubDate>Sun, 18 Aug 2019 14:36:29 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/autocad-forum/creating-a-hatch-into-a-closed-polyline-with-lisp/m-p/8972318#M130664</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2019-08-18T14:36:29Z</dc:date>
    </item>
    <item>
      <title>Re: Creating a hatch into a closed polyline with LISP</title>
      <link>https://forums.autodesk.com/t5/autocad-forum/creating-a-hatch-into-a-closed-polyline-with-lisp/m-p/8972361#M130665</link>
      <description>&lt;P&gt;This works here:&lt;/P&gt;
&lt;PRE&gt;(defun c:arrow	(/ ent)
  (command "_.pline" '(0 150) '(600 0) '(0 -150) "_c" "")
  (setq ENT (entlast))
  (command "_hatch" "SOLID" ENT "")
  (princ)
)&lt;/PRE&gt;</description>
      <pubDate>Sun, 18 Aug 2019 15:32:12 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/autocad-forum/creating-a-hatch-into-a-closed-polyline-with-lisp/m-p/8972361#M130665</guid>
      <dc:creator>j.palmeL29YX</dc:creator>
      <dc:date>2019-08-18T15:32:12Z</dc:date>
    </item>
    <item>
      <title>Re: Creating a hatch into a closed polyline with LISP</title>
      <link>https://forums.autodesk.com/t5/autocad-forum/creating-a-hatch-into-a-closed-polyline-with-lisp/m-p/8974250#M130666</link>
      <description>&lt;P&gt;If you want to use FKT:ARROW as a command you can type in, put a &lt;STRONG&gt;&lt;FONT color="#FF0000"&gt;C:&lt;/FONT&gt;&lt;/STRONG&gt; before the name:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&amp;nbsp;(defun &lt;FONT color="#FF0000"&gt;&lt;STRONG&gt;C:&lt;/STRONG&gt;&lt;/FONT&gt;FKT:ARROW ()&lt;/P&gt;
&lt;P&gt;If not, you must use it by entering the function name &lt;FONT color="#FF0000"&gt;with enclosing parentheses&lt;/FONT&gt;:&lt;/P&gt;
&lt;P&gt;&amp;nbsp; &lt;FONT color="#FF0000"&gt;&lt;STRONG&gt;(&lt;/STRONG&gt;&lt;/FONT&gt;FKT:ARROW&lt;FONT color="#FF0000"&gt;&lt;STRONG&gt;)&lt;/STRONG&gt;&lt;/FONT&gt;&lt;/P&gt;</description>
      <pubDate>Mon, 19 Aug 2019 17:19:13 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/autocad-forum/creating-a-hatch-into-a-closed-polyline-with-lisp/m-p/8974250#M130666</guid>
      <dc:creator>Kent1Cooper</dc:creator>
      <dc:date>2019-08-19T17:19:13Z</dc:date>
    </item>
    <item>
      <title>Re: Creating a hatch into a closed polyline with LISP</title>
      <link>https://forums.autodesk.com/t5/autocad-forum/creating-a-hatch-into-a-closed-polyline-with-lisp/m-p/8974266#M130667</link>
      <description>&lt;P&gt;Heureka! - Thanks so much, it works :).&lt;/P&gt;</description>
      <pubDate>Mon, 19 Aug 2019 17:25:38 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/autocad-forum/creating-a-hatch-into-a-closed-polyline-with-lisp/m-p/8974266#M130667</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2019-08-19T17:25:38Z</dc:date>
    </item>
    <item>
      <title>Re: Creating a hatch into a closed polyline with LISP</title>
      <link>https://forums.autodesk.com/t5/autocad-forum/creating-a-hatch-into-a-closed-polyline-with-lisp/m-p/8974286#M130668</link>
      <description>&lt;P&gt;May can you explain me in addition, why does it works this way? What is the meaning of the command (princ) in this case and why do I have to enter the Symbol ENT inside the brackets behind the slash? Thanks for your support!&lt;/P&gt;</description>
      <pubDate>Mon, 19 Aug 2019 17:34:45 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/autocad-forum/creating-a-hatch-into-a-closed-polyline-with-lisp/m-p/8974286#M130668</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2019-08-19T17:34:45Z</dc:date>
    </item>
    <item>
      <title>Re: Creating a hatch into a closed polyline with LISP</title>
      <link>https://forums.autodesk.com/t5/autocad-forum/creating-a-hatch-into-a-closed-polyline-with-lisp/m-p/8974316#M130669</link>
      <description>&lt;BLOCKQUOTE&gt;&lt;HR /&gt;@Anonymous&amp;nbsp;wrote:&lt;BR /&gt;
&lt;P&gt;May can you explain me in addition, why does it works this way? What is the meaning of the command (princ) in this case and why do I have to enter the Symbol ENT inside the brackets behind the slash? Thanks for your support!&lt;/P&gt;
&lt;HR /&gt;&lt;/BLOCKQUOTE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Neither of those is what makes it work.&amp;nbsp; It's the &lt;FONT color="#000000"&gt;&lt;STRONG&gt;c:&lt;/STRONG&gt;&lt;/FONT&gt; before the command name that makes it work.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;The (princ) is referred to as "quiet exit" so that you don't see nil at the Command line after you run it -- see Help about that and (prin1) and (print).&amp;nbsp; AutoLisp functions/command-definitions return the last thing in them at the end.&amp;nbsp; This command definition ends with a (command) function, which always returns nil, and that will appear at the Command line and confuse some people if it isn't squelched by ending with a function that does nothing and returns nothing.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;The (/ ent) is "localizing variables" -- see Help for the (defun) function.&amp;nbsp; It's not essential, but good practice, and depending on your use of variable names, could prevent different routines interfering with each other.&lt;/P&gt;</description>
      <pubDate>Mon, 19 Aug 2019 17:46:36 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/autocad-forum/creating-a-hatch-into-a-closed-polyline-with-lisp/m-p/8974316#M130669</guid>
      <dc:creator>Kent1Cooper</dc:creator>
      <dc:date>2019-08-19T17:46:36Z</dc:date>
    </item>
  </channel>
</rss>

