<?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: Hatching Script with Plotstyle in Visual LISP, AutoLISP and General Customization Forum</title>
    <link>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/hatching-script-with-plotstyle/m-p/10629440#M55170</link>
    <description>&lt;P&gt;I did think about. Not sure exactly where to start though. I figured script or lisp would be much easier to create and load. I used a script above, and also wrote a lisp this morning that is probably not very good, but it works. Again, all I need to be able to do is set the plotstyle of the new hatch to "Black 60%" while keeping the plotstyle of the layer C-SITE-PVMT-PATT "Black". I'm close, but I just can't get it.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;(defun c:hdcp (/ la)&lt;BR /&gt;(setq la (getvar "clayer"))&lt;BR /&gt;(if (tblsearch "layer" "C-SITE-PVMT-PATT")&lt;BR /&gt;(setvar "clayer" "C-SITE-PVMT-PATT")&lt;BR /&gt;(command&lt;/P&gt;&lt;P&gt;"_. LAYER"&amp;nbsp;&lt;/P&gt;&lt;P&gt;"T" "C-SITE-PVMT-PATT"&lt;/P&gt;&lt;P&gt;"M" "C-SITE-PVMT-PATT"&amp;nbsp;&lt;/P&gt;&lt;P&gt;"C" "7" ""&lt;/P&gt;&lt;P&gt;"LT" "Continuous" ""&lt;/P&gt;&lt;P&gt;"D" "Project Site: Pavement hatching" "*" "_yes"&lt;/P&gt;&lt;P&gt;"PS" "Black" "C-SITE-PVMT-PATT"&lt;/P&gt;&lt;P&gt;""&amp;nbsp;&lt;/P&gt;&lt;P&gt;); end command function&lt;/P&gt;&lt;P&gt;&lt;FONT&gt;);end if&lt;BR /&gt;(command "-hatch" "Properties" "cross" ".5" "0" "co" "195" "none" pause "")&lt;BR /&gt;(setvar "clayer" la)&lt;BR /&gt;(princ)&lt;/FONT&gt;&lt;BR /&gt;)&lt;/P&gt;</description>
    <pubDate>Fri, 17 Sep 2021 12:15:29 GMT</pubDate>
    <dc:creator>Nathan_Tigner</dc:creator>
    <dc:date>2021-09-17T12:15:29Z</dc:date>
    <item>
      <title>Hatching Script with Plotstyle</title>
      <link>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/hatching-script-with-plotstyle/m-p/10627815#M55168</link>
      <description>&lt;P&gt;I have many hatches in tool palettes. The original way to create hatches in tool palettes is not working well. We are getting many errors and also don't like the process of hatching from a tool palette.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;To get around hatching from the tool palette while still using the tool palette, I wrote a script that uses -hatch and changes all the settings for each hatch. See example below. The only problem I can't figure out is that I need to set the plotstyle for the individual hatch being used. The layer uses "black" plotstyle, but some of the hatches need to be "black 60%" or "black 80%" plotstyles. Is there a way to specify the specific hatch plotstyle in the script? And if not, is it possible to do all of this is LISP instead? Any info would be greatly appreciated.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Example Script:&lt;/P&gt;&lt;P&gt;-layer&lt;BR /&gt;new&lt;BR /&gt;C-SITE-PVMT-PATT&lt;BR /&gt;color&lt;BR /&gt;7&lt;BR /&gt;C-SITE-PVMT-PATT&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;-hatch&lt;BR /&gt;p&lt;BR /&gt;cross&lt;BR /&gt;.5&lt;BR /&gt;0&lt;BR /&gt;la&lt;BR /&gt;C-SITE-PVMT-PATT&lt;BR /&gt;co&lt;BR /&gt;195&lt;BR /&gt;none&lt;/P&gt;</description>
      <pubDate>Thu, 16 Sep 2021 19:25:11 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/hatching-script-with-plotstyle/m-p/10627815#M55168</guid>
      <dc:creator>Nathan_Tigner</dc:creator>
      <dc:date>2021-09-16T19:25:11Z</dc:date>
    </item>
    <item>
      <title>Re: Hatching Script with Plotstyle</title>
      <link>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/hatching-script-with-plotstyle/m-p/10628364#M55169</link>
      <description>&lt;P&gt;Have you looked at image menu's fully controllable, these are pop menu's or could use a toolbar with say flyouts, the default image menu has 16 images, you can make your own custom dcl like a 3x3, 2x2 etc&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="SeaHaven_0-1631841650550.png" style="width: 400px;"&gt;&lt;img src="https://forums.autodesk.com/t5/image/serverpage/image-id/966263iAD16471008BCDD81/image-size/medium?v=v2&amp;amp;px=400" role="button" title="SeaHaven_0-1631841650550.png" alt="SeaHaven_0-1631841650550.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 17 Sep 2021 01:21:24 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/hatching-script-with-plotstyle/m-p/10628364#M55169</guid>
      <dc:creator>Sea-Haven</dc:creator>
      <dc:date>2021-09-17T01:21:24Z</dc:date>
    </item>
    <item>
      <title>Re: Hatching Script with Plotstyle</title>
      <link>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/hatching-script-with-plotstyle/m-p/10629440#M55170</link>
      <description>&lt;P&gt;I did think about. Not sure exactly where to start though. I figured script or lisp would be much easier to create and load. I used a script above, and also wrote a lisp this morning that is probably not very good, but it works. Again, all I need to be able to do is set the plotstyle of the new hatch to "Black 60%" while keeping the plotstyle of the layer C-SITE-PVMT-PATT "Black". I'm close, but I just can't get it.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;(defun c:hdcp (/ la)&lt;BR /&gt;(setq la (getvar "clayer"))&lt;BR /&gt;(if (tblsearch "layer" "C-SITE-PVMT-PATT")&lt;BR /&gt;(setvar "clayer" "C-SITE-PVMT-PATT")&lt;BR /&gt;(command&lt;/P&gt;&lt;P&gt;"_. LAYER"&amp;nbsp;&lt;/P&gt;&lt;P&gt;"T" "C-SITE-PVMT-PATT"&lt;/P&gt;&lt;P&gt;"M" "C-SITE-PVMT-PATT"&amp;nbsp;&lt;/P&gt;&lt;P&gt;"C" "7" ""&lt;/P&gt;&lt;P&gt;"LT" "Continuous" ""&lt;/P&gt;&lt;P&gt;"D" "Project Site: Pavement hatching" "*" "_yes"&lt;/P&gt;&lt;P&gt;"PS" "Black" "C-SITE-PVMT-PATT"&lt;/P&gt;&lt;P&gt;""&amp;nbsp;&lt;/P&gt;&lt;P&gt;); end command function&lt;/P&gt;&lt;P&gt;&lt;FONT&gt;);end if&lt;BR /&gt;(command "-hatch" "Properties" "cross" ".5" "0" "co" "195" "none" pause "")&lt;BR /&gt;(setvar "clayer" la)&lt;BR /&gt;(princ)&lt;/FONT&gt;&lt;BR /&gt;)&lt;/P&gt;</description>
      <pubDate>Fri, 17 Sep 2021 12:15:29 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/hatching-script-with-plotstyle/m-p/10629440#M55170</guid>
      <dc:creator>Nathan_Tigner</dc:creator>
      <dc:date>2021-09-17T12:15:29Z</dc:date>
    </item>
    <item>
      <title>Re: Hatching Script with Plotstyle</title>
      <link>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/hatching-script-with-plotstyle/m-p/10629473#M55171</link>
      <description>&lt;P&gt;The line like this just after your -hatch line won't help?&lt;/P&gt;
&lt;P&gt;(command "_.chprop" "_last" "" "_plotstyle" "Black 60%" "")&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Or it's the 'cplotstyle sysvar if you want to set it prior to the command in the same manner as the 'clayer.&lt;/P&gt;
&lt;DIV id="gtx-trans" style="position: absolute; left: 133px; top: 113.358px;"&gt;
&lt;DIV class="gtx-trans-icon"&gt;&amp;nbsp;&lt;/DIV&gt;
&lt;/DIV&gt;</description>
      <pubDate>Fri, 17 Sep 2021 12:38:03 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/hatching-script-with-plotstyle/m-p/10629473#M55171</guid>
      <dc:creator>ВeekeeCZ</dc:creator>
      <dc:date>2021-09-17T12:38:03Z</dc:date>
    </item>
    <item>
      <title>Re: Hatching Script with Plotstyle</title>
      <link>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/hatching-script-with-plotstyle/m-p/10629487#M55172</link>
      <description>&lt;P&gt;Boom! That's it! Thank you so much!&lt;/P&gt;</description>
      <pubDate>Fri, 17 Sep 2021 12:38:25 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/hatching-script-with-plotstyle/m-p/10629487#M55172</guid>
      <dc:creator>Nathan_Tigner</dc:creator>
      <dc:date>2021-09-17T12:38:25Z</dc:date>
    </item>
    <item>
      <title>Re: Hatching Script with Plotstyle</title>
      <link>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/hatching-script-with-plotstyle/m-p/10629525#M55173</link>
      <description>&lt;BLOCKQUOTE&gt;&lt;HR /&gt;&lt;a href="https://forums.autodesk.com/t5/user/viewprofilepage/user-id/10415207"&gt;@Nathan_Tigner&lt;/a&gt;&amp;nbsp;wrote:&lt;BR /&gt;
&lt;P&gt;I did think about. Not sure exactly where to start though. I figured script or lisp would be much easier to create and load. I used a script above, and also wrote a lisp this morning that is probably not very good, but it works. Again, all I need to be able to do is set the plotstyle of the new hatch to "Black 60%" while keeping the plotstyle of the layer C-SITE-PVMT-PATT "Black". I'm close, but I just can't get it.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;(defun c:hdcp (/ la)&lt;BR /&gt;&lt;STRIKE&gt;(setq la (getvar "clayer"))&lt;/STRIKE&gt;&lt;BR /&gt;&lt;STRIKE&gt;(if (tblsearch "layer" "C-SITE-PVMT-PATT")&lt;/STRIKE&gt; &lt;FONT color="#FF0000"&gt;; the layer exist, what happen if is frozen?&lt;/FONT&gt;&lt;BR /&gt;&lt;STRIKE&gt;(setvar "clayer" "C-SITE-PVMT-PATT") ;&lt;/STRIKE&gt;&lt;BR /&gt;(command&lt;/P&gt;
&lt;P&gt;"_. LAYER"&amp;nbsp;&lt;/P&gt;
&lt;P&gt;"T" "C-SITE-PVMT-PATT" &lt;FONT color="#FF0000"&gt;; the layer does not exist so why you do thaw it?&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;"M" "C-SITE-PVMT-PATT"&amp;nbsp;&lt;/P&gt;
&lt;P&gt;"C" "7" ""&lt;/P&gt;
&lt;P&gt;"LT" "Continuous" ""&lt;/P&gt;
&lt;P&gt;"D" "Project Site: Pavement hatching" "*" "_yes"&lt;/P&gt;
&lt;P&gt;"PS" "Black" "C-SITE-PVMT-PATT"&lt;/P&gt;
&lt;P&gt;""&amp;nbsp;&lt;/P&gt;
&lt;P&gt;); end command function&lt;/P&gt;
&lt;P&gt;&lt;FONT&gt;);end if&lt;BR /&gt;(command "-hatch" "Properties" "cross" ".5" "0" "co" "195" "none" pause "")&lt;BR /&gt;&lt;STRIKE&gt;(setvar "clayer" la)&lt;/STRIKE&gt;&lt;BR /&gt;(princ)&lt;/FONT&gt;&lt;BR /&gt;)&lt;/P&gt;
&lt;HR /&gt;&lt;/BLOCKQUOTE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Think of the code you wrote...&lt;/P&gt;
&lt;P&gt;Better remove the crossed out.&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 17 Sep 2021 12:50:30 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/hatching-script-with-plotstyle/m-p/10629525#M55173</guid>
      <dc:creator>ВeekeeCZ</dc:creator>
      <dc:date>2021-09-17T12:50:30Z</dc:date>
    </item>
  </channel>
</rss>

