<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>AutoCAD Tips Blog &#187; productivity</title>
	<atom:link href="http://www.ellenfinkelstein.com/acadblog/tag/productivity/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.ellenfinkelstein.com/acadblog</link>
	<description>AutoCAD tips &#38; tutorials to help you work faster &#38; smarter</description>
	<lastBuildDate>Fri, 10 Feb 2012 16:49:39 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.3.1</generator>
		<item>
		<title>Reduce mouse-clicks and increase productivity using AutoLISP</title>
		<link>http://www.ellenfinkelstein.com/acadblog/reduce-mouse-clicks-and-increase-productivity-using-autolisp/</link>
		<comments>http://www.ellenfinkelstein.com/acadblog/reduce-mouse-clicks-and-increase-productivity-using-autolisp/#comments</comments>
		<pubDate>Mon, 17 Oct 2011 16:20:45 +0000</pubDate>
		<dc:creator>Ellen</dc:creator>
				<category><![CDATA[Customization]]></category>
		<category><![CDATA[Editing]]></category>
		<category><![CDATA[AutoLISP]]></category>
		<category><![CDATA[fillet]]></category>
		<category><![CDATA[productivity]]></category>

		<guid isPermaLink="false">http://www.ellenfinkelstein.com/acadblog/?p=1792</guid>
		<description><![CDATA[
			
				
			
		
<p>This is a guest post by Sanjay Kulkarni, an AutoCAD programmer. You can read more about him at the end of this post.</p>
<p>The number of mouse-clicks required to perform a task is generally a good indicator of productivity. The fewer the number of clicks, the less time required&#8211;hence more productivity.</p>
<p>In this post we will see [...]]]></description>
			<content:encoded><![CDATA[<div class="tweetmeme_button" style="float: right; margin-left: 10px;">
			<a href="http://api.tweetmeme.com/share?url=http%3A%2F%2Fwww.ellenfinkelstein.com%2Facadblog%2Freduce-mouse-clicks-and-increase-productivity-using-autolisp%2F"><br />
				<img src="http://api.tweetmeme.com/imagebutton.gif?url=http%3A%2F%2Fwww.ellenfinkelstein.com%2Facadblog%2Freduce-mouse-clicks-and-increase-productivity-using-autolisp%2F&amp;style=normal&amp;b=2" height="61" width="50" /><br />
			</a>
		</div>
<p>This is a guest post by Sanjay Kulkarni, an AutoCAD programmer. You can read more about him at the end of this post.</p>
<p>The number of mouse-clicks required to perform a task is generally a good indicator of productivity. The fewer the number of clicks, the less time required&#8211;hence more productivity.</p>
<p>In this post we will see an example of reducing the number of mouse-clicks, and thus improving productivity, using AutoLISP. We will use the example of the FILLET command.</p>
<p>Thanks to one of the blog readers Bruce Newman, who sent a problem to me. It was the source for this post.</p>
<p>The most simple situation where you create a fillet is when two perpendicular lines meet. Inside the FILLET command, you select the two lines (requiring 2 clicks) and AutoCAD creates the fillet.</p>
<p><img class="aligncenter size-full wp-image-1793" title="AlispBlog-1110-Fig1" src="http://www.ellenfinkelstein.com/acadblog/wordpress/wp-content/uploads/2011/10/AlispBlog-1110-Fig1.png" alt="Reducing clicks and increasing productivity in AutoCAD with AutoLISP" width="250" height="497" /></p>
<p>&nbsp;</p>
<p>The equivalent AutoLISP code would be</p>
<p>(command “fillet” (car (entsel “\nSelect the first line: “))(entsel “\nSelect the second line: “)))</p>
<p>This still requires two clicks.</p>
<p>So, the problem now reduces to finding a method to select two lines with a single click.</p>
<p>Before trying in AutoLISP, let’s find out if we can do it manually. There seems to be no option or a work-around to do what we want.</p>
<p>Luckily, we have a single point (the intersection) that is common to both lines. So, let’s explore if we can somehow use the intersection point to select the 2 lines. If you have to click only one point to select multiple objects, obviously it should be the intersection point.</p>
<p>Study of selection methods shows that there are two options that base their selection on two points: crossing &amp; window. Since W must include the objects fully, it won’t be suitable. So let’s try C option.</p>
<p>Use the SELECT command and then the <strong>c</strong> option and click on the intersection point in response to both points. AND …….. Both lines are selected!</p>
<p>The equivalent AutoLISP code would be</p>
<p>(setq ssLines (ssget “c” (setq pt1 (getpoint “\nSelect Intersection: “) ) pt1))</p>
<p>Now I can use each line to create a fillet.</p>
<p>(command “fillet” (ssname ssLines 0) (ssname ssLines 1))</p>
<p>And yes … the fillet appears!</p>
<p><img class="aligncenter size-full wp-image-1795" title="AlispBlog-1110-Fig2" src="http://www.ellenfinkelstein.com/acadblog/wordpress/wp-content/uploads/2011/10/AlispBlog-1110-Fig2.png" alt="Reducing clicks and increasing productivity in AutoCAD using AutoLISP" width="650" height="560" /></p>
<p>&nbsp;</p>
<p>So, here is my simple program:</p>
<p>(defun c:FiletByPt ()</p>
<p>;;; creates fillet by single click</p>
<p>;;; ssk 110918</p>
<p>(setq ssLines (ssget &#8220;c&#8221; (setq pt1 (getpoint &#8220;\nSelect Intersection: &#8220;) ) pt1))</p>
<p>(command &#8220;fillet&#8221; (ssname ssLines 0) (ssname ssLines 1))</p>
<p>)</p>
<p>(prompt &#8220;\nCreates a fillet by single click. Type &#8216;FiletByPt&#8217;&#8221;)</p>
<p><strong>Note:</strong> In the command name above, FiletByPt, &#8220;fillet&#8221; is intentionally spelled &#8220;filet&#8221; to avoid confusion as you start to type the custom AutoLISP command.</p>
<p>To use the above code, copy and paste it into Notepad and save it as filetbypt.lsp in a location that is in AutoCAD&#8217;s support file search path. <a href="http://www.ellenfinkelstein.com/acadblog/how-to-load-an-autolisp-program/">Instructions for loading the program are here.</a></p>
<p>However life is always not so simple. The lines may extend beyond the intersection point. My R&amp;D shows that the above code still works as shown in Fig. 3.</p>
<p><img class="aligncenter size-full wp-image-1796" title="AlispBlog-1110-Fig3" src="http://www.ellenfinkelstein.com/acadblog/wordpress/wp-content/uploads/2011/10/AlispBlog-1110-Fig3.png" alt="AutoCAD tip: Reduce clicks and increase productivity in AutoCAD with AutoLISP" width="420" height="570" /></p>
<p>It even works when the two lines are not perpendicular.</p>
<p>When two lines are selected using a single point, AutoCAD finds and trims shorter segments of each line and then creates a fillet between the two remaining segments.</p>
<p>There might be situations (when two lines meet at the midpoint) where the code may not work or possibly needs modification.</p>
<p>But, if creating fillets is a major task for you, and saving 50% of time can result in significant gain, go ahead and use this code.</p>
<p>Are you stuck-up with such trivial tasks that are strain on your resources? Let me know and we’ll see if I can help you with useful hints or sample code.</p>
<p>Sanjay Kulkarni is an experienced CAD (AutoCAD, Inventor, SolidEdge, CATIA, NX) programmer and a member of the Autodesk Developer Network. He is fluent in AutoLISP, VBA, and VB.NET. He has written for AugiWORLD and Inside AutoCAD. He can be contacted at <a href="mailto:sanganaksakha@gmail.com">sanganaksakha@gmail.com</a></p>
<p>&nbsp;</p>
]]></content:encoded>
			<wfw:commentRss>http://www.ellenfinkelstein.com/acadblog/reduce-mouse-clicks-and-increase-productivity-using-autolisp/feed/</wfw:commentRss>
		<slash:comments>16</slash:comments>
		</item>
		<item>
		<title>Productivity boost ideas</title>
		<link>http://www.ellenfinkelstein.com/acadblog/productivity-boost-ideas/</link>
		<comments>http://www.ellenfinkelstein.com/acadblog/productivity-boost-ideas/#comments</comments>
		<pubDate>Tue, 22 Sep 2009 15:47:33 +0000</pubDate>
		<dc:creator>Ellen</dc:creator>
				<category><![CDATA[Customization]]></category>
		<category><![CDATA[AutoLISP]]></category>
		<category><![CDATA[productivity]]></category>
		<category><![CDATA[shortcuts]]></category>

		<guid isPermaLink="false">http://www.ellenfinkelstein.com/acadblog/?p=62</guid>
		<description><![CDATA[
			
				
			
		
<p>Note: This is an article by Fran Golding, Senior Drafter at Parsons Brinckerhoff, a large planning, environment and infrastructure firm with offices in Australia and New Zealand. Perhaps you can add your own productivity boost ideas.</p>
<p>When I first started to drive a car, I had the feeling that I was not the one in control. [...]]]></description>
			<content:encoded><![CDATA[<div class="tweetmeme_button" style="float: right; margin-left: 10px;">
			<a href="http://api.tweetmeme.com/share?url=http%3A%2F%2Fwww.ellenfinkelstein.com%2Facadblog%2Fproductivity-boost-ideas%2F"><br />
				<img src="http://api.tweetmeme.com/imagebutton.gif?url=http%3A%2F%2Fwww.ellenfinkelstein.com%2Facadblog%2Fproductivity-boost-ideas%2F&amp;style=normal&amp;b=2" height="61" width="50" /><br />
			</a>
		</div>
<p><em>Note: This is an article by Fran Golding, Senior Drafter at Parsons Brinckerhoff, a large planning, environment and infrastructure firm with offices in Australia and New Zealand. Perhaps you can add your own productivity boost ideas.</em></p>
<p>When I first started to drive a car, I had the feeling that I was not the one in control. The car was controlling me. It took some</p>
<div class="wp-caption alignright" style="width: 346px"><img title="Out of control" src="http://www.ellenfinkelstein.com/autocadtips/images/acadtips_productivity_boost-3.jpg" alt="Out of control" width="336" height="252" /><p class="wp-caption-text">Out of control</p></div>
<p>time and practice before that changed. Likewise, when I started to use AutoCAD, I had the same feeling. All sorts of things happened which I did not understand. With time and practice (quite a lot of time and practice, I might add), that changed. As with driving a car, I did the same functions, the same way in which I was taught. It wasn’t until I had more confidence in what I was doing that I branched out and tried new ways of doing things. Thence came the beginning of my productivity boost!</p>
<p>Unlike driving a car, AutoCAD performs the same functions in many different ways. You can start the PLOT command by typing plot at the command line, choosing a toolbar or ribbon icon, or choosing File&gt; Print from the drop-down menu (with variations depending on your release and workspace). Any of these will perform the same result. When you are first learning to “drive” AutoCAD, chances are you will generally follow the exact method which you were taught. It’s not until you understand how the program works that you can speed up what you do by creating shortcuts.</p>
<p>I am always surprised to find that users with many years experience still perform functions the long way. Often it depends on what (or who) they have been exposed to at their jobs. It rings true for any trade – if you have an innovative mentor, you will be more innovative! With the technological information super highway we have so much information at our finger tips. There is just no need to plod along doing the same things, the same way, year after year, after year!</p>
<p>“How much difference can it make?” I hear you asking. If we measure key strokes performed in a day, then reduce them by only one key stroke, it compounds to a staggering saving in a year.</p>
<p>To increase your productivity, you don’t need to reinvent the wheel. If you don’t know where to start and you don’t have a resident CAD guru in your office, don’t despair! An Internet search will return countless results. Don’t be put off. Start your journey with that one step. It will lead to the next in a very short time.</p>
<h3>Create aliases</h3>
<p>The very first step which I took was to add some command aliases to my ACAD.PGP file. Aliases allow you to type one letter at the command line instead of the full word, such as E for Erase, C for Copy or M for Move. They cut out many key strokes. <strong>Editors note:</strong> In AutoCAD 2010, go to Manage tab&gt; Customization panel&gt; Edit Aliases to customize acad.pgp. You can also open acad.pgp from Windows in a text editor; its location varies according to your release and Windows version.</p>
<div class="wp-caption aligncenter" style="width: 331px"><img title="Part of the acad.pgp file" src="http://www.ellenfinkelstein.com/autocadtips/images/acadtips_productivity_boost-2.png" alt="Part of the acad.pgp file" width="321" height="440" /><p class="wp-caption-text">Part of the acad.pgp file</p></div>
<h3>Write simple AutoLISP routines</h3>
<p>The next step which I took was to write some very simple AutoLISP routines. I began my own AutoLISP file which I added to the Startup Suite. This means you do not need to load the routines individually each time you start AutoCAD. <strong>Editors note:</strong> To add a .lsp file to the Startup Suite, use the APPLOAD command. In the Load/Unload Applications dialog box, locate the file and drag it to the Startup Suite icon.</p>
<div class="wp-caption aligncenter" style="width: 275px"><img title="Drag AutoLISP files to the Startup Suite" src="http://www.ellenfinkelstein.com/autocadtips/images/acadtips_productivity_boost-1.png" alt="Drag AutoLISP files to the Startup Suite" width="265" height="269" /><p class="wp-caption-text">Drag AutoLISP files to the Startup Suite</p></div>
<p>Some examples of these very simple routines are getting distance measurements with selected object snaps. For example, I sometimes need to obtain a distance nearest an object or line, then perpendicular to an object or line. The coding for this looks like: <span class="prompt">(defun C:DNP () (command “DIST” “NEA” pause “PER”))</span></p>
<p>Then, typing DNP at the command line allows me get the information I need. You might say that you can easily set OSNAPS and achieve the same thing, but the above coding ensures that the correct object snap is used every time. This can often be critical.</p>
<p><strong>Editor&#8217;s note:</strong> The syntax is <span class="prompt">(defun C:[name] () (command &#8220;DIST&#8221; &#8220;[osnap]&#8221; pause &#8220;[osnap]&#8220;))</span> where <span class="prompt">[name]</span> is the name of the custom command you are creating and what you type to execute it and <span class="prompt">[osnap]</span> is any object snap you want to use. The pause command stops the execution of the routine for user input, in this case, specifying a point.</p>
<p>From here there are many more such command combinations that you can write using the same syntax, and substituting different object snaps, such as:</p>
<ul>
<li>DII (distance from intersection to intersection):<br />
<span class="prompt">(defun C:Dii () (command “DIST” “INTERSECTION” pause “INTERSECTION”))</span></li>
<li>DEE (distance from endpoint to endpoint)<br />
<span class="prompt">(defun C:DEE () (command “DIST” “ENDPOINT” pause “ENDPOINT”))</span></li>
<li>DEP (distance from endpoint to perpendicular)<br />
<span class="prompt">(defun C:DEP () (command “DIST” “ENDPOINT” pause “PERPENDICULAR”))</span></li>
</ul>
<p>Likewise, you can write many AutoLISP routines to draw lines using selected object snaps:</p>
<ul>
<li>LINE command from Nearest, then Perpendicular to an object or line:<br />
<span class="prompt">(defun C:LNP () (command “LINE” “NEA” pause “PER”))</span></li>
<li>LEE (line from endpoint to endpoint):<br />
<span class="prompt">(defun C:LEE () (command “LINE” “ENDPOINT” pause “ENDPOINT”))</span></li>
<li>LME (line midpoint to endpoint):<br />
<span class="prompt">(defun C:LME () (command “LINE” “MIDPOINT” pause “ENDPOINT”))</span></li>
</ul>
<p><strong>Editor&#8217;s note: </strong>Here, the syntax is similar, but uses the LINE command instead of the DIST command.</p>
<p>Once you start writing these, you can easily add others. Even slightly more complex AutoLISP <ins datetime="2009-08-30T16:27" cite="mailto:ellen"> </ins>routines will become easy to write. For example, you can write AutoLISP routines to change system variables such as turning wipe out frames on or off.</p>
<ul>
<li>To turn wipe out frames on:<br />
<span class="prompt">(defun C:WF1 () (command &#8220;WIPEOUT&#8221; &#8220;FRAME&#8221; “ON&#8221;))</span></li>
<li>To turn wipe out frames off:<br />
<span class="prompt">(defun C:WF01 () (command &#8220;WIPEOUT&#8221; &#8220;FRAME&#8221; &#8220;OFF&#8221;))</span></li>
</ul>
<p>If you look closely at the coding, you will notice that the text inside the inverted commas [quotation marks] is what you would normally type at the command line.</p>
<p>Another series of handy AutoLISP routines is creating frequently used layers, setting their colour and setting them to current. For example, the company I work for specifies that all dimensions are drawn on a layer called “DIMS” which has the color 2 (yellow). The AutoLISP to create this layer looks like: <span class="prompt">(defun C:D2 () (command “-LAYER” “N” “DIMS” “S” “DIMS” “C” “2” “”))</span></p>
<p>You can then write extras to add many more layers such as a layer to draw hatches would look exactly the same as for DIMS with the appropriate substitutes. For example: <span class="prompt">(defun C:H2 () (command “-LAYER” “N” “HATCHES” “S” “DIMS” “C” “2” “”))</span></p>
<p>My company also has a dedicated layer for inserting external reference drawings called XREF. So, the code to create this and set it current looks like: <span class="prompt">(defun C:X2 () (command “-LAYER” “N” “XREF” “S” “DIMS” “C” “2” “”))</span></p>
<p>Here are some more of my favourites:</p>
<ul>
<li>To lock or unlock viewports:<br />
<span class="prompt">(defun C:V0 () (command  “MVIEW”      “LOCK” “OFF” pause “”))<br />
(defun C:V1 () (command  “MVIEW”      “LOCK” “ON” pause “”))</span></li>
<li>To fillet lines using a zero radius:<br />
<span class="prompt">(defun C:F0 () (command  “FILLET”      “R” “0”) (command “FILLET”))</span></li>
<li>To fillet using a supplied radius:<br />
<span class="prompt">(defun C:FR () (setq rad (getstring “\n Enter Radius:”))<br />
(command  “FILLET” “R” rad)<br />
(command      “FILLET” pause pause)<br />
(princ))</span></li>
</ul>
<p><strong>Editor&#8217;s note:</strong> This last routine uses the setq AutoLISP command to set a variable named rad to the result of user input in response to the Enter Radius: prompt. It then uses the result to set the fillet radius.</p>
<p>The key to successfully boosting your productivity is to keep on learning. You will be surprised how much greater satisfaction you will get out of increasing your learning. Greater productivity leads to a win-win situation. Your employer will be pleased, and who knows — that may lead to greater remuneration. In this article, I want to encourage all users to embrace the latest and strive to be more productive each day!</p>
]]></content:encoded>
			<wfw:commentRss>http://www.ellenfinkelstein.com/acadblog/productivity-boost-ideas/feed/</wfw:commentRss>
		<slash:comments>13</slash:comments>
		</item>
	</channel>
</rss>

