<?xml version="1.0" encoding="utf-8" ?>
<?xml-stylesheet type="text/xsl" href="RSS_xslt_style.asp" version="1.0" ?>
<rss version="2.0" xmlns:WebWizForums="http://syndication.webwiz.co.uk/rss_namespace/">
 <channel>
  <title>CAD Forum discussion (EN) : About custom macro buttons scripts</title>
  <link>https://www.cadforum.cz/forum_en/</link>
  <description><![CDATA[This is an XML content feed of; CAD Forum discussion (EN) : AutoCAD : About custom macro buttons scripts]]></description>
  <pubDate>Wed, 22 Apr 2026 23:44:34 +0000</pubDate>
  <lastBuildDate>Mon, 21 Mar 2011 13:13:02 +0000</lastBuildDate>
  <docs>http://blogs.law.harvard.edu/tech/rss</docs>
  <generator>Web Wiz Forums 12.04</generator>
  <ttl>360</ttl>
  <WebWizForums:feedURL>https://www.cadforum.cz/forum_en/RSS_post_feed.asp?TID=5516</WebWizForums:feedURL>
  <image>
   <title><![CDATA[CAD Forum discussion (EN)]]></title>
   <url>https://www.cadforum.cz/forum_en/forum_images/web_wiz_forums.png</url>
   <link>https://www.cadforum.cz/forum_en/</link>
  </image>
  <item>
   <title><![CDATA[About custom macro buttons scripts : I have a problem.Well, basically...]]></title>
   <link>https://www.cadforum.cz/forum_en/forum_posts.asp?TID=5516&amp;PID=14185&amp;title=about-custom-macro-buttons-scripts#14185</link>
   <description>
    <![CDATA[<strong>Author:</strong> <a href="https://www.cadforum.cz/forum_en/member_profile.asp?PF=163642">xikes</a><br /><strong>Subject:</strong> 5516<br /><strong>Posted:</strong> 21.Mar.2011 at 13:13<br /><br />I have a problem.<br>Well, basically I've created two buttons with custom scripts - one, that creates and exports layer state of current file, and another one, that imports the layer state saved with the previous button.<br>Here's the problem. When I open a file and try to export the layer state using my button, it doesn't work. It only works after I open and close the CUI customization window (and only by clicking somewhere on the toolbar and selecting "Customize..."). The weird part is, that I don't have to change anything in CUI settings, I can just click cancel and after the CUI window has closed, my macro buttons work. Why is this? What exactly changed after I opened and closed the CUI customization window? Is there a way to solve this, so it wouldn't be necessary to open the CUI window?<br>Here's how the comandline window looks in both cases:<br>Before opening and closing the CUI<br>http://i126.photobucket.com/albums/p116/xikes/ls_er.jpg<br>After opening and closing the CUI<br>http://i126.photobucket.com/albums/p116/xikes/ls_ner.jpg<br><br>Here's the script, I used for the buttons:<br>Export:<br>^C^C-layer A S layer_state^M EX layer_state;"$M=$(getvar,DWGPREFIX)"layer_state.las""";;;^C^C<br><br>Import:<br>^C^C-layer A I;"$M=$(getvar,DWGPREFIX)"layer_state.las""";R;layer_state;^C^Cchange ALL^M P C BYLAYER;;^C^C<br><br>I'm using AutoCad 2007LT.<br><br>Note. the last part of the import button simply changes the color of everything to bylayer.<br>]]>
   </description>
   <pubDate>Mon, 21 Mar 2011 13:13:02 +0000</pubDate>
   <guid isPermaLink="true">https://www.cadforum.cz/forum_en/forum_posts.asp?TID=5516&amp;PID=14185&amp;title=about-custom-macro-buttons-scripts#14185</guid>
  </item> 
 </channel>
</rss>