tag:blogger.com,1999:blog-60001629254233212412024-02-07T09:33:20.365-08:00CADing and CodingMy experiments on AutoCAD programming and customization.har!shttp://www.blogger.com/profile/06728551650806056859noreply@blogger.comBlogger55125tag:blogger.com,1999:blog-6000162925423321241.post-1915989351986940282011-03-22T23:32:00.000-07:002011-03-23T21:40:33.858-07:00AutoCAD 2012: GIS/Pipeline People to Breathe a Sigh of Relief with Enhanced Raster File Support<span style="font-family:arial;">If you have ever worked with heavy raster images in AutoCAD, you know very well how painful the experience is. Especially for those people working with huge aerial / satellite imagery, it is nearly impossible to use TIF image format to represent a large area due to huge image file size. This is why compressed image formats like ECW (Enhanced Compression Wavelet), MrSID (Multiresolution Seamless Image Database) etc. are highly popular among these people.</span><br /><span style="font-family:arial;"></span><br /><span style="font-family:arial;">The compressed images files are comparatively very small in size and are easy to handle inside AutoCAD drawings. These images required additional installation of plug-ins/object enablers prior to AutoCAD release 2012. The good news is that from 2012 onwards, these file formats are natively supported in AutoCAD, thereby requiring no additional installations. Here is a complete list of newly supported raster files.</span><br /><br /><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhLoyyNpeQH6xy4b-4ullAHbqfu8CZL-IvRgP1W2x0C0cFBYTwDyb3h-kGb3T-mKCEhMd4y__3feXXyARegqpaqU4hnvFMfbPPLW2fzn1czi938QIe2j6ysXSiwPVW8p9UqYG79Z3E3ZTc/s1600/Raster_Formats_1.gif"><img id="BLOGGER_PHOTO_ID_5587172277018122338" style="CURSOR: hand; alt: " src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhLoyyNpeQH6xy4b-4ullAHbqfu8CZL-IvRgP1W2x0C0cFBYTwDyb3h-kGb3T-mKCEhMd4y__3feXXyARegqpaqU4hnvFMfbPPLW2fzn1czi938QIe2j6ysXSiwPVW8p9UqYG79Z3E3ZTc/s400/Raster_Formats_1.gif" border="0" /></a><br /><br /><br /><div><div></div><div></div></div>har!shttp://www.blogger.com/profile/06728551650806056859noreply@blogger.com6tag:blogger.com,1999:blog-6000162925423321241.post-34326702546269353732011-03-21T00:04:00.000-07:002011-03-21T00:12:51.320-07:00A Simple Macro for Switching Between Rectangular and Isometric Snaps<span style="font-family:arial;">Have you had the habit of working on isometric drawings frequently? I do a lot of isometric drawings during my work. While doing these drawings, you may need to switch between rectangular and isometric snaps several times. Here is a simple macro to easily switch between these snap modes.<br /><br /><span style="color:#990000;">^C^C_<span class="blsp-spelling-error" id="SPELLING_ERROR_0">setvar</span>;<span class="blsp-spelling-error" id="SPELLING_ERROR_1">SNAPSTYL</span>;$M=$(if,$(=,$(<span class="blsp-spelling-error" id="SPELLING_ERROR_2">getvar</span>,<span class="blsp-spelling-error" id="SPELLING_ERROR_3">SNAPSTYL</span>),0),1,0)</span><br /></span><br /><span style="font-family:arial;">I found a <a href="http://ltunlimited.typepad.com/my_weblog/2009/01/drafting-settings-part-1-snap-and-grid.html">similar macro</a> commented by Kate <span class="blsp-spelling-error" id="SPELLING_ERROR_4">Morrical</span> in her own blog <a href="http://ltunlimited.typepad.com/">LT Unlimited</a>. Here goes Kate's version.<br /></span><br /><span style="font-family:arial;"><span style="color:#990000;">$M=$(if,$(=,$(<span class="blsp-spelling-error" id="SPELLING_ERROR_5">getvar</span>,<span class="blsp-spelling-error" id="SPELLING_ERROR_6">SNAPSTYL</span>),1),<span class="blsp-spelling-error" id="SPELLING_ERROR_7">SNAPSTYL</span>;0;;,<span class="blsp-spelling-error" id="SPELLING_ERROR_8">SNAPSTYL</span>;1;;)</span><br /></span><br /><span style="font-family:arial;">Thanks Kate, for the handy macro.</span>har!shttp://www.blogger.com/profile/06728551650806056859noreply@blogger.com1tag:blogger.com,1999:blog-6000162925423321241.post-57475894454084450802010-11-26T01:33:00.001-08:002010-11-26T01:55:54.736-08:00Sharing Raster Files? Convert Them to Easily Viewable Formats Using Autodesk Design Review<p>Here is another reason for you to have Autodesk Design Review installed on your desktop. In a previous post, you saw <a href="http://cadingandcoding.blogspot.com/2009/04/how-to-use-autodesk-design-review-as.html">how to use Autodesk Design Review as your default viewer for raster files</a>. What if somebody else – for example, somebody from top management or a subcontractor - who doesn’t have Autodesk Design Review or any other raster file viewers installed on their system wants to review the raster design files? Don’t worry about installing the viewers everywhere. We can easily convert these files to PDF or TIF files using Autodesk Design Review.</p><p align="left">Open Autodesk Design Review application on your desktop. Make sure that the ‘List View’ and ‘Thumbnails’ palettes are switched on in the ‘Show/Hide Palettes’ ribbon menu.<br /><br /><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjB7BkRtvOMV-Puq7RvjGEzgOQ8_AX7BVMSYewxD0OAND5rSOGdtjYs9UjOyxeLFDhZ_DAxZgoFM4-nXQImjx0nUrt2imkn_xmR_RqhXRpVfmJSuve6rNbDNfMUqPq46DAi3xR7DeDqlyc/s1600-h/Raster2PDF_011.png"><img style="BORDER-RIGHT-WIDTH: 0px; DISPLAY: inline; BORDER-TOP-WIDTH: 0px; BORDER-BOTTOM-WIDTH: 0px; MARGIN-LEFT: 0px; BORDER-LEFT-WIDTH: 0px; MARGIN-RIGHT: 0px" title="Raster2PDF_01" border="0" alt="Raster2PDF_01" align="left" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgSZQACjz_ioeWTEmu9qAuFxiLzWTKjCFgw-voSy-WrPMZK1CWVRXbgc4kG8Bjej4ZvVuqjtSunKnZcJMagEevKc3ocQJQ7xunSiRtesPPyhPi9FzDr-tHmYwGdb2KmkErx1Z6WE7B_T-Y/?imgmax=800" width="444" height="312" /></a> </p><ol><li></li></ol><p></p><p> </p><p> </p><p> </p><p> </p><p> </p><p> </p><p> </p><p> </p><p><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEj1soO7gsQF_TBluGaHZ_AX3uIIBLbH4gyMdYjuLHVakgbHt2hpYkHMebVQ1vCttH9SyYgvIjF3T3VMcxrDVby6GOAHWTkraJd1mRWOUl5r6zhUJpQHvbdyTedClc1pHU_bgJIAj_6J-sA/s1600-h/Raster2PDF_023.png"><img style="BORDER-RIGHT-WIDTH: 0px; DISPLAY: inline; BORDER-TOP-WIDTH: 0px; BORDER-BOTTOM-WIDTH: 0px; BORDER-LEFT-WIDTH: 0px" title="Raster2PDF_02" border="0" alt="Raster2PDF_02" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgIDDDp8xzY-kD0ARAjOkFx5YVeZ2-EFwcQOqhyZd1dthMMoAqeepmNrLH4_4TCQHO2deg_zyqbAJTmVelbTxQYvEWhoSqiYG60eoY8fGP4iNO2y2OeEPo6yS8ifnfqsNVjCEir2RnuoTM/?imgmax=800" width="444" height="312" /></a> </p><p>Open windows explorer and select raster files you wish to convert (use Ctrl+A for in case want you select all the files in the folder).</p><p><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjkSfYpAYS5kncwZ9tcefbhzL6FmrT77GPR8_TLxc7UlDhDv-WSGtz-tYnswgmwvE9f7LAtZklZaVoqYZtfuVdNFFpfFIDJnHtsA6b4eNMhiwKtMdzRtl44A04mnQgKLvKRoIx72JGEfUM/s1600-h/Raster2PDF_036.png"><img style="BORDER-RIGHT-WIDTH: 0px; DISPLAY: inline; BORDER-TOP-WIDTH: 0px; BORDER-BOTTOM-WIDTH: 0px; BORDER-LEFT-WIDTH: 0px" title="Raster2PDF_03" border="0" alt="Raster2PDF_03" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjqaSMz9sCWHpQDugr1d3t8bjBGMlZoYlGerEt9YmwYB-KGtJi1f2d6132IHUEzGzpY6OfxTFMXThzs0RXa1PiacCEOyLrMk9LPPeD3qwNyLua-PDusjPMVnT1zpCIigD-hkQ5dsrQZhqs/?imgmax=800" width="444" height="294" /></a> </p><p>Now drag and drop them inside the ‘List View’ window / Thumbnail window.</p><p><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEi5o59wfnRKvaE7GxtvE5lPMQxMX0M-NI6HIxjQGhBa-V2S0yXYO82bugc-rpC14gGQAVU8-g6YbudnOIOzHIEcmtQfS9o1O3sPfE3prPbx-w_qEJ-hePKk25jqUDb93tSBFur2emfAELI/s1600-h/Raster2PDF_043.png"><img style="BORDER-RIGHT-WIDTH: 0px; DISPLAY: inline; BORDER-TOP-WIDTH: 0px; BORDER-BOTTOM-WIDTH: 0px; BORDER-LEFT-WIDTH: 0px" title="Raster2PDF_04" border="0" alt="Raster2PDF_04" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhIjjHxp1J0BPEEYwCExgxXAapNoYXOXadfEmLHljvQ3VAj0dWuINFjWkCUsi9tGfMP3FiyGsGTiCXe_V-skU5mKuYeQrRBNKftjC_O3_bzvmKGdSYwTtuGIyiQZDkpJe7ysI_XY4FspMI/?imgmax=800" width="444" height="255" /></a> <br />You can drag the files inside the list view to arrange them in the proper order.</p><p><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEj-DQxmPH15Joi1m-EMdsbRxEZoyc3rFjJyb8dcgZAQ1Rh_RkrllTfklxzpkWHEo9xaPCCTCrYVxEu9mjNFPUwC4pmlqpDMFE9MGVwkx1Wo0V1Ag05MPhHV-VtFTJXgSw1D1m7gSOQiUBA/s1600-h/Raster2PDF_053.png"><img style="BORDER-RIGHT-WIDTH: 0px; DISPLAY: inline; BORDER-TOP-WIDTH: 0px; BORDER-BOTTOM-WIDTH: 0px; BORDER-LEFT-WIDTH: 0px" title="Raster2PDF_05" border="0" alt="Raster2PDF_05" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgrY8A_UOsAVqy1bBTKuNkgfYhiHelIBss8L1n9rpWJ8hHCUnYqqV1XyHD3e3v9IOginFmedQKFbusl84UlEIyjliDs2eJx6qspMEIpqjA5lAqzdRD8gcGs_7pI-V1ZeL04L-4F95xVvKg/?imgmax=800" width="444" height="255" /></a> </p><p>Use the ‘Thumbnail’ tab, if you want to preview while arranging them in order.</p><p><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgFSvUnLgQbEGk8Faw2jHE7wOsEF82S2jpxMSmHFsOYehojc0OwoOp6YGq1P7nrGfzzoGenzrZGfYX1IPhXscaCcHPQ9nyW109WnXN4mtrVQZHIcy8RcwGBL0HHEDJ1yDKnE9w_xkFrW70/s1600-h/Raster2PDF_066.png"><img style="BORDER-RIGHT-WIDTH: 0px; DISPLAY: inline; BORDER-TOP-WIDTH: 0px; BORDER-BOTTOM-WIDTH: 0px; BORDER-LEFT-WIDTH: 0px" title="Raster2PDF_06" border="0" alt="Raster2PDF_06" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEg-ijJPavWtQtZ8dfGjKhquew_Y25uRr1mxwWte4hQK9BXrX35Ebwi-uk_uvg6X0YVvszOAzFXZkxkfbLCh7f7ACp0iOU7MHCXjOHT_PF8DucP32189iu98qMG4I_Qs_ppDtKkcJMup-ug/?imgmax=800" width="444" height="255" /></a> </p><p>Select all the files in the ‘List View’ or ‘Thumbnails’ palette and right click to choose ‘Print’ option in the popup menu.</p><p><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEi8paSpXykOwz9uNoOdK1gcu5TGFf32BApWCvMmAMfF_KinrRKI04wcLIhYffUmnRNyN_MFOdh8hvLTzeZYOzRG3yZe9Ircz-4_iJHqoxPCHw4ZS5kbXF6RXsJIVBuxjRrOw8HDMWiyWVg/s1600-h/Raster2PDF_073.png"><img style="BORDER-RIGHT-WIDTH: 0px; DISPLAY: inline; BORDER-TOP-WIDTH: 0px; BORDER-BOTTOM-WIDTH: 0px; BORDER-LEFT-WIDTH: 0px" title="Raster2PDF_07" border="0" alt="Raster2PDF_07" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiOb2fGlw3oaH1dgSNWLAfMlq-Wa8l0FveYJ6hDWFJdUyW9qIp6one5hpYjQZmisFh0WZcDbllKEjfqfUfmcDBWnN3dxMj8R6-wnaivgDKrNqZrkuKnK86LViCoJI9DkNXX6AEhmnM0rFE/?imgmax=800" width="444" height="253" /></a> </p><p>In the print dialog box, select the PDF writer of your choice (I use CutePDF writer which is really nice and free). Your can also use common printers like ‘Microsoft Document Image Writer’ to get a multipage TIF document output. Don’t forget to select ‘Choose paper source by DWF page size’ in the ‘Page Handling' section, if you want to preserve original sheet sizes. The print range will be selected ‘All’ by default. Ignore the print range shown in the image as I selected ‘Current sheet only’ option by mistake while taking the snapshot :-).</p><p></p><p></p><p></p><p></p><p></p><p><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjLHddCuIS4faVd8TGhGmh_0LaHhyheEPXjnCn1RlOgTMaTvBc-7OXxzlOlp-fuBao_Rh5lD6W3PWIU1wzKNm1D_sHGiLcuiP0GRDnx1mLK3_MWEMiq4IFGGna8tBY-0VLS2BrVddtunD8/s1600-h/Raster2PDF_083.png"><img style="BORDER-RIGHT-WIDTH: 0px; DISPLAY: inline; BORDER-TOP-WIDTH: 0px; BORDER-BOTTOM-WIDTH: 0px; BORDER-LEFT-WIDTH: 0px" title="Raster2PDF_08" border="0" alt="Raster2PDF_08" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEitnskvK0RRrahQt3FCdJiUZ39vhiutikNfq3fswl92a-ziKQ0ED-eg-WsQoxW21OIbBwne-bwcUL-kvAUNVF3A0sR_ebnaEXqFr-QLJix80WeCflIsCeWzlHsiYtm9tKjkT8fgmsWbe_E/?imgmax=800" width="444" height="422" /></a> </p><p>That’s it. Now your uncommon raster file formats are ready to be shared with most of the people around you. Trust me; Autodesk Design Review is worth more than a free design review application. Go and <a href="http://usa.autodesk.com/adsk/servlet/pc/index?siteID=123112&id=4086277">grab it right now from Autodesk site</a> for free of cost!</p>har!shttp://www.blogger.com/profile/06728551650806056859noreply@blogger.com2tag:blogger.com,1999:blog-6000162925423321241.post-74301870630548728692010-10-11T12:31:00.001-07:002010-10-11T12:34:31.626-07:00An Easy Way to Publish Drawings from Different Folders<p>How do you publish drawings from different folders? Do you navigate to each folder from the publish dialog box for selecting files? That sounds really painful. Don’t worry; a simple drag and drop trick can ease your pain. </p><p>I will show you the method to accomplish this with the help of a sample folder structure. The following image shows a sample root folder with 5 different project folders. </p><p><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjiBwvZN5LwzA-vWuDXyt7HCm2e-qBJwmeVnAGsir0OSvcTh592vL5mflmOhQsKto0Fbqd8vIJOVMqjH_ZAOFSRgB4dvoZcTOBsASM-tEw_8GGOK687lNLc-wI5OXfVT-vqT6KL7S0vvsg/s1600-h/Drag_n_Drop_Publish_01%5B10%5D.png"><img style="BORDER-RIGHT-WIDTH: 0px; DISPLAY: block; FLOAT: none; BORDER-TOP-WIDTH: 0px; BORDER-BOTTOM-WIDTH: 0px; MARGIN-LEFT: auto; BORDER-LEFT-WIDTH: 0px; MARGIN-RIGHT: auto" title="Drag_n_Drop_Publish_01" border="0" alt="Drag_n_Drop_Publish_01" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgvscJFhuzCwcJ11imjQ7ImU9uE-EVlhsLlzzFrnOleteYptJTjfdumjbaUsacwQFkXnnxxx1WMPGcE_pmTEpXDRFk23i4uWboj04-jjcjMZeEHFeM8RkWVrFGywGfRKb9smaL4tVHNOU0/?imgmax=800" width="444" height="242" /></a></p><p>Each folder contains different drawing files. For publishing all the drawings in a single stretch, follow the steps as given below.</p><ul><li>Click on the root folder (‘Sample’ in this case) and hit the search button on the toolbar. </li><li>Type *.dwg to list all the drawings under the root folder and subfolders. </li></ul><p><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhcaUtMmJFx-JMaT1PzmERSu0uHrZniKl8CcuzIlodPmr7r7CMTty4r7R-j6NQVev22HSL4F5EygTk4xbBxZEZQT03US_SK4iqzAy7BQTe6u42saKHAwesWByvnKZh8jb6Q5HMVDNAiUtw/s1600-h/Drag_n_Drop_Publish_02%5B3%5D.png"><img style="BORDER-RIGHT-WIDTH: 0px; DISPLAY: inline; BORDER-TOP-WIDTH: 0px; BORDER-BOTTOM-WIDTH: 0px; BORDER-LEFT-WIDTH: 0px" title="Drag_n_Drop_Publish_02" border="0" alt="Drag_n_Drop_Publish_02" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjiWOih7PaeGFqw_lDaKQ56nJzgyXb191SHw9PphEjDQyOnJRAUNlKodZimZt26y3PTjJ4k76mY1aWex7ZxJulZKRDck6ZwGYyNEpBdN6D15PdCWNnt-TH88uu0gK2U64cloAZ7rORcfhU/?imgmax=800" width="444" height="450" /></a> </p><ul><li>Invoke the publish dialog box inside AutoCAD. </li><li>Press Ctrl+A to select all files or use Ctrl/Shift + Left Mouse Click to select only desired files in the explorer search window. </li><li>Now drag and drop the selected files to the publish dialog box. That’s it! You are done with selecting multiple files from multiple folders. </li></ul><p><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjSZLjiZCdJpcsL0HFj4DAXcICQn1nkOW-gtxmsPJVhY91FWzpB_CtPJrmahPOdx5LhsyXv2t-vkFGLfe4jKsnSggMf8EyAr0E_U6WKNjaOv2_pujUoUZbQrRYEiNBwUXrQiQSQria88X4/s1600-h/Drag_n_Drop_Publish_03%5B3%5D.png"><img style="BORDER-RIGHT-WIDTH: 0px; DISPLAY: inline; BORDER-TOP-WIDTH: 0px; BORDER-BOTTOM-WIDTH: 0px; BORDER-LEFT-WIDTH: 0px" title="Drag_n_Drop_Publish_03" border="0" alt="Drag_n_Drop_Publish_03" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEglefMf7scpf0bKlLOHw7V1Q4GSJ4-3ajgZmix8fmw34Q1c4BTdsgEhEJBbRJ1a0RcOaxVuQJWG0Ac3hfQ_yVDK9vmNIKr8ps_za_wM0X0C1Co-ynhmMujccqdmN9IUW_UcWb0AUCHwC-k/?imgmax=800" width="444" height="514" /></a> </p><p></p><p></p><p>Try that and you will come to know that it is as simple as any other AutoCAD <a href="http://cadingandcoding.blogspot.com/search/label/Drag%20%27n%27%20Drop">drag & drop</a> operations.</p>har!shttp://www.blogger.com/profile/06728551650806056859noreply@blogger.com3tag:blogger.com,1999:blog-6000162925423321241.post-64189679036408593612010-07-15T14:16:00.001-07:002010-10-11T12:35:48.292-07:00A Quick Tip on Publishing Drawings into Individual PDF Files<p>Recently our designers came across a requirement of publishing drawings into individual PDF files. For those who don’t know, here is the main setting you have to remember while publishing PDF files. </p><ol><li>Click on ‘Publish Options’ button inside the Publish dialog box. </li><li>Inside the Publish Options window, select type as ‘Single-sheet file’ instead of ‘Multi-sheet file’ in the ‘General DWF/PDF options’ as shown in the image below. </li></ol><p><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjhQMo9PDTGuC-hcz2Th6SdTMpabwuBZb-V_87yAF0KlGJwR3Wfyc1ZaH_jc9O5IjM6qblze3St9fqq5iR28LX5YOAP6x_sQ_bMlQYKITzcny5tlb37VsIu2NAnl3nkuOiCFE0LQzKl0A0/s1600-h/Publish_Single%5B6%5D.png"><img style="BORDER-RIGHT-WIDTH: 0px; DISPLAY: inline; BORDER-TOP-WIDTH: 0px; BORDER-BOTTOM-WIDTH: 0px; BORDER-LEFT-WIDTH: 0px" title="Publish_Single" border="0" alt="Publish_Single" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhzECNg-VjLCwyQFrRoizkkAqfKG0eoTCY6jv131dAbqjba2DHYk6-_1BItXXfJkqrTtqSoWQuiWvqpWTZfgvYtXsczo5X55u__BrOiXmi6wQxNp-zBhIWzjzl67lyEtwvv8zc4XUMTAco/?imgmax=800" width="424" height="442" /></a> </p><p>Rest of the publish settings shall be same as publishing multiple PDF files. This tip might be familiar to most of you. Well, I have another tip for you to handle post publish PDF file names using windows command prompt. Using REN command with a combination of wildcard characters, you can easily rename the PDF files to standard names. For example, you would like to rename ‘Drawing_xxx-Model.pdf’ file to ‘Drawing_xxx.pdf’ format where xxx stands for unique characters. Here is the command for the above scenario.</p><p><span style="font-family:Courier New;font-size:100%;color:#800000;">REN *_???-Model.pdf *_???.pdf</span></p><p><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgYUBow5eHTPZBRQUv6h7zWOoReseLVKjYBFoUfUXtnITAAzMHdNu5khnawpzxiiwzlO3PNDk8YSkEwbmgaWeYIYWKPns-J_dwDWo89mCxLDjS1BlySwm5_JYb8r2spNt8z0mUjYFMqwOU/s1600-h/CMD_01%5B3%5D.png"><img style="BORDER-RIGHT-WIDTH: 0px; DISPLAY: inline; BORDER-TOP-WIDTH: 0px; BORDER-BOTTOM-WIDTH: 0px; BORDER-LEFT-WIDTH: 0px" title="CMD_01" border="0" alt="CMD_01" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjnkJ7vb7WkIfjA9tebvpSf7ffQq61HgvewEa7kEBIRfqfzYtZ35GP_XY_nwaI76MpC6Wng1jpnfoU5XDQh-mSS_ClhqljYV8uuCT75h4ua2O9nItmoXLPp2CdUTmQrqTt9HOL0nNy7J_M/?imgmax=800" width="424" height="302" /></a> </p><p></p><p>As you can see in the above image, the file names have been modified using a single command line. The wildcard combination may vary from case to case. Have a look at windows commands and command prompt if you have not yet experimented with it. It will definitely help you to handle your day-to-day tasks easily and comfortably.</p>har!shttp://www.blogger.com/profile/06728551650806056859noreply@blogger.com0tag:blogger.com,1999:blog-6000162925423321241.post-85205171593391816442010-07-08T12:30:00.001-07:002010-07-08T12:37:10.810-07:00A Macro for Aligning Text, MText and Block Entities Horizontally and Vertically in AutoCAD LT<p>It has been a long time since I made my last post here. I was seriously thinking of dropping the blogging activities, mainly due to lack of unique ideas. But when I received an email request from a AutoCAD LT user for a macro for aligning objects like Text entities, I couldn't resist trying it out and sharing it with you people. My sincere apologies to all readers for leaving such a long gap. That said, to be honest, I don’t have any idea when I am going to publish my next tip over here.</p><p>Back to our post topic. These macros can be used to align entities like Text, Mtext, Blocks and literally any object that comes with an insertion base point, both horizontally and vertically.That means you can use this macro to align a Text entity with an MText or Block Reference. The only limitation you will come across is that you will have to select the entities one by one as opposed to selecting all together in AutoLISP or VBA programs. </p><p>You have already seen <a href="http://cadingandcoding.blogspot.com/search/label/DIECAL">the power of combining DIESEL with the CAL command</a> (I call it DIECAL for ease of use). Once again, I am going to use the power of DIECAL to accomplish our task. Here goes the first macro, used for aligning entities vertically.</p><p><span style="font-family:Courier New;color:#ff0000;">*^C^C$M=$(if,$(=,$(getvar,useri5),0),osmode;0;_id;\userr3;'cal;rxof(@);\)useri5;0;select;single;\lastpoint;'cal;ins;@;\userr4;'cal;ryof(@);\userr5;'cal;rzof(@);\useri5;1;_move;p;;'cal;@;'cal;xof([getvar(userr3),0,0])+yof([0,getvar(userr4),0])+zof([0,0,getvar(userr5)]);</span></p><p>For you to get an idea how it works, please find the image below consisting of different types of entities. </p><p><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhQFb0zSKzNbc_nFNt3U6jftCkSEliMOAmciUGc9HAmEtc_nuJ5Q2pdNtUzSJq8FrxiJCSk5y_NWAzJJmvI_eKpMoorjubBOhzXwzJM82pcLCb0k_bpvKQ3Aq5JwZoxpngSNfh_6pCxUaw/s1600-h/Vert_Pre_Align2.png"><img title="Vert_Pre_Align" style="BORDER-TOP-WIDTH: 0px; DISPLAY: inline; BORDER-LEFT-WIDTH: 0px; BORDER-BOTTOM-WIDTH: 0px; BORDER-RIGHT-WIDTH: 0px" height="124" alt="Vert_Pre_Align" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiO7qpdcj1k27AgUmb0rFxSAVkqVmPDpJoPHwsZbqem7QcfgMXiFk3UUo_K4DEM_hEOrXg7HzLJVsQuxpmRw0bBRTGseCtFs7X_WGWcF5UE_ryu9C-aTxZ5T0AYPcc_Po16jr9ZvrwYg2A/?imgmax=800" width="244" border="0" /></a> </p><p>The next picture illustrates what the align vertical macro can do with these entities.</p><p><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiZQlFN-72wcJbpx1nmfgSKwBLb1_7luuOt19d2kdD7nHZ05wua62HYbZjjl0xb-qA7BdTPhnEnHppjpmdNx3mSZl229j64bdsKbEhRY_q81_P5YKJ0UC2qfWDB4HxXgWF7j1SXkkDMd1c/s1600-h/Vert_Post_Align2.png"><img title="Vert_Post_Align" style="BORDER-TOP-WIDTH: 0px; DISPLAY: inline; BORDER-LEFT-WIDTH: 0px; BORDER-BOTTOM-WIDTH: 0px; BORDER-RIGHT-WIDTH: 0px" height="130" alt="Vert_Post_Align" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhs2oQSdoJ64q2azXH2zRO8Hma8QWT1r27Onh0jSeVxJcexeu5qfF4f_zmtsepGsqw2vhIWSahIfQHbZNJ05hkIkctWQCvjmmkMq7zExARSItEv5nSY4CTPVrrL3Axt_JddVaqKR34ou9k/?imgmax=800" width="244" border="0" /></a> </p><p>With a small modification in the macro, you can use it to align these entities horizontally as well. Here is the modified macro for horizontal alignment.</p><p><span style="font-family:Courier New;color:#ff0000;">*^C^C$M=$(if,$(=,$(getvar,useri5),0),osmode;0;_id;\userr4;'cal;ryof(@);\)useri5;0;select;single;\lastpoint;'cal;ins;@;\userr3;'cal;rxof(@);\userr5;'cal;rzof(@);\useri5;1;_move;p;;'cal;@;'cal;xof([getvar(userr3),0,0])+yof([0,getvar(userr4),0])+zof([0,0,getvar(userr5)]);</span></p><p>And here is the illustration of the macro functionality.</p><p>Before running the macro.</p><p><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhpv94I9wNUF7l4iwDal-UC0ghcPDP9FrflReF120Wdv2Pk9Dt3Qeqsk9dBWO2BKxHcA8ijTAyodrJCJsvtiI7khowWuqLoQU-h15_HFrIZmaDlCPrdTqg3UIbgO7zegoVYg9QJv1J_BGE/s1600-h/Horz_Pre_Align2.png"><img title="Horz_Pre_Align" style="BORDER-TOP-WIDTH: 0px; DISPLAY: inline; BORDER-LEFT-WIDTH: 0px; BORDER-BOTTOM-WIDTH: 0px; BORDER-RIGHT-WIDTH: 0px" height="124" alt="Horz_Pre_Align" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiUDbQ_KUNTBdc1W4i18JwaWJBHLEYoSa9xOqw13ZSddviSNl5XZ_r9Ir_yzJt6EizBMNsTpRm5jRErI8J55b7FMXEhJRlkFqLrx39B2agMLOiuZPTlGYpdnnBFG84X8s7ZL_ruLHLnSko/?imgmax=800" width="244" border="0" /></a> </p><p>After running the macro.</p><p><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgQxOkB7AfcYTm8uTf3am5Xd3Yy1bjf6U86jb9jIGEqmuOTwTBaXTB7GBCNEh8cE8tsGNBFSjWAgWuX584uL_YW9809i4g1O5u6mvajakS-83kToL4TsT17GgzejmWoQK_txo_tLhyphenhyphenGZ-c/s1600-h/Horz_Post_Align2.png"><img title="Horz_Post_Align" style="BORDER-TOP-WIDTH: 0px; DISPLAY: inline; BORDER-LEFT-WIDTH: 0px; BORDER-BOTTOM-WIDTH: 0px; BORDER-RIGHT-WIDTH: 0px" height="52" alt="Horz_Post_Align" src="http://lh4.ggpht.com/_noXPaSLgP5s/TDYnR8JiaOI/AAAAAAAAANk/tQCJFElehg8/Horz_Post_Align_thumb.png?imgmax=800" width="244" border="0" /></a> </p><p>These macros have been tested in AutCAD LT 2011 and works fine over there. I hope it will work with previous versions also, at least in the recent versions of AutoCAD LT. If you come across any problems, please feel free to post it here.</p><p>Many thanks to Adam for inspiring me to develop this :-)</p>har!shttp://www.blogger.com/profile/06728551650806056859noreply@blogger.com3tag:blogger.com,1999:blog-6000162925423321241.post-36117099556223497862009-09-26T06:12:00.000-07:002009-09-26T07:16:18.269-07:00Extracting 3D DWF Model Properties Using Autodesk Design Review API and AutoCAD VBA<span style="font-family:arial;">A while ago I came across a situation where I had to extract line lists, valve lists, equipment lists and fittings lists from a DWF file. The DWF file was converted from a PDS model review file (DRI) using NavisWorks. After a few hours research on Autodesk Design Review API, I could extract all the required lists with a few lines of code. Ofcourse, with the help of fast dying AutoCAD VBA.</span><br /><br /><span style="font-family:arial;">As the code makes use of CExpressViewerContol, you need to place it inside a form before running the code. You may use any COM compliant development environment in place of AutoCAD VBA. But I would like to stick to AutoCAD VBA till its last breath due to ease of use.</span><br /><pre class="csharpcode"><br /><span class="kwrd">Sub</span> ExtractDwfProps()<br /><span class="rem">'### Extracts properties from model components of a 3D DWF file</span><br /><span class="rem">'### By zoomharis@gmail.com</span><br /><span class="rem">'### Date: 09/09/09</span><br /><br /><span class="rem">'### Based on Autodesk Design Review 2010 API</span><br /><br /><span class="rem">'### DWF specific references</span><br /><span class="rem">' -----------------------</span><br /><span class="rem">'### AdCommon 1.0 Type Library</span><br /><span class="rem">'### ECompositeViewer 1.0 Type Library</span><br /><span class="rem">'### ExpressViewerDll 1.0 Type Library</span><br /><br /><span class="rem">'### DWF specific controls</span><br /><span class="rem">' ---------------------</span><br /><span class="rem">'### CExpressViewerContol</span><br /><br /><span class="kwrd">On</span> <span class="kwrd">Error</span> <span class="kwrd">Resume</span> <span class="kwrd">Next</span><br /><span class="kwrd">Dim</span> oECV <span class="kwrd">As</span> ECompositeViewer.IAdECompositeViewer<br /><span class="kwrd">Dim</span> oSec <span class="kwrd">As</span> ECompositeViewer.IAdSection<br /><span class="kwrd">Dim</span> oEnt <span class="kwrd">As</span> AdCommon.IAdObject<br /><span class="kwrd">Dim</span> oProp <span class="kwrd">As</span> AdCommon.IAdProperty<br /><span class="kwrd">Dim</span> oCol <span class="kwrd">As</span> AdCommon.CAdCollection<br /><span class="kwrd">Dim</span> oCont <span class="kwrd">As</span> ECompositeViewer.IAdContent<br /><span class="kwrd">Dim</span> strDwfLoc <span class="kwrd">As</span> <span class="kwrd">String</span><br /><span class="kwrd">Dim</span> strPropName <span class="kwrd">As</span> <span class="kwrd">String</span><br /><span class="kwrd">Dim</span> strPropValue <span class="kwrd">As</span> <span class="kwrd">String</span><br /><span class="rem">'## Let me use a sample 3D dwf file</span><br />strDwfLoc = <span class="str">"C:\Dwf\3DModel.dwf"</span><br />strPropName = <span class="str">""</span><br />strPropValue = <span class="str">""</span><br /><span class="rem">'## Open the dwf file in the viewer</span><br />CExpressViewerContol1.SourcePath = strDwfLoc<br /><span class="kwrd">Set</span> oECV = CExpressViewerContol1.ECompositeViewer<br /><span class="rem">'## Iterate through the dwf model</span><br /><span class="kwrd">For</span> <span class="kwrd">Each</span> oSec <span class="kwrd">In</span> oECV.Sections<br /> <span class="kwrd">Set</span> oCont = oSec.Content<br /> <span class="kwrd">Set</span> oCol = oCont.Objects(0)<br /> <span class="kwrd">For</span> <span class="kwrd">Each</span> oEnt <span class="kwrd">In</span> oCol<br /> <span class="kwrd">For</span> <span class="kwrd">Each</span> oProp <span class="kwrd">In</span> oEnt.Properties<br /> strPropName = oProp.Name<br /> strPropValue = oProp.value<br /> <span class="kwrd">Next</span><br /> <span class="rem">'## Write code here to apply conditions to filter the list</span><br /> <span class="rem">'## and send the extracted info into a text or excel file.</span><br /> <span class="rem">'## Then clear the property name and property value strings</span><br /> strPropName = <span class="str">""</span><br /> strPropValue = <span class="str">""</span><br /> <span class="kwrd">Next</span><br /><span class="kwrd">Next</span><br /><span class="kwrd">Set</span> oProp = <span class="kwrd">Nothing</span><br /><span class="kwrd">Set</span> oEnt = <span class="kwrd">Nothing</span><br /><span class="kwrd">Set</span> oCol = <span class="kwrd">Nothing</span><br /><span class="kwrd">Set</span> oCont = <span class="kwrd">Nothing</span><br /><span class="kwrd">Set</span> oSec = <span class="kwrd">Nothing</span><br /><span class="kwrd">Set</span> oECV = <span class="kwrd">Nothing</span><br /><span class="kwrd">End</span> <span class="kwrd">Sub</span></pre><br /><span style="font-family:arial;">I have stripped down some of the code portion as it was specific my purpose. This is mostly in a general form and you may need to add/modify wherever necessary in order to run it in your system.</span>har!shttp://www.blogger.com/profile/06728551650806056859noreply@blogger.com2tag:blogger.com,1999:blog-6000162925423321241.post-67982318225767321132009-09-12T03:36:00.001-07:002009-09-12T04:17:10.827-07:00Creating Complex Selection Sets Using FILTER Command<span style="font-family:arial;">It always make me wonder why the FILTER command is often overlooked by most of the AutoCAD users of current era, especially the newbies. It may be partially due to the fact that this command can get highly complicated at times depending upon the requirement. Ofcourse, it can be. But the power is always accompanied by complexity. Some of the advantages of this most powerful selection tool are;</span><br /><ul><li><span style="font-family:arial;">Creating selection sets based upon multiple criteria</span></li><li><span style="font-family:arial;">Creating logical groups without physically grouping it</span></li><li><span style="font-family:arial;">Flexibility to use transparently in between the commands</span></li></ul><p><span style="font-family:arial;">To make it simple (sorry, if you find it otherwise ;-), let us go by a sample. I have a Piping & Instrumentation diagram in which I need to create a selection set of major and minor process lines along with the line numbers. The newbie designer has drawn some of the lines as LINE entity and rest of them as POLYLINE entity. All the major lines are placed inside 'MAJOR' layer and the minor ones in 'MINOR' layer. The line number is placed inside an attributed block reference named 'LINENO' which resides in 'LINE_NUM' layer. The image below illustrates the filter criteria for creating the above selection set. </span></p><p><span style="font-family:arial;"></span> </p><span style="font-family:arial;"></span><br /><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEg6IitmprGfSwuPaz5BWRAyVYVh05EQqBhe8g5eGLPcX_T5qXpBTAOGJKKOUHIUsqUv95f-u9ABIpGafBo7iZ4IIYw6ds-Lw2GqHdS8Zawkby6u_DdKch1c82aOHp3gqTVNpc5SptfQ44I/s1600-h/Filter_01.png"><span style="font-family:arial;"><img style="TEXT-ALIGN: center; MARGIN: 0px auto 10px; WIDTH: 388px; DISPLAY: block; HEIGHT: 400px; CURSOR: hand" id="BLOGGER_PHOTO_ID_5380528545278563730" border="0" alt="" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEg6IitmprGfSwuPaz5BWRAyVYVh05EQqBhe8g5eGLPcX_T5qXpBTAOGJKKOUHIUsqUv95f-u9ABIpGafBo7iZ4IIYw6ds-Lw2GqHdS8Zawkby6u_DdKch1c82aOHp3gqTVNpc5SptfQ44I/s400/Filter_01.png" /></span></a><span style="font-family:arial;"> </span><br /><span style="font-family:arial;">This is a nested filter criteria that makes it little difficult to understand. Nothing to worry. Let us split it into smaller portions so that we can analyse it easily.Following is the description of each portion in the order as shown in the image. </span><br /><span style="font-family:arial;"><br /></span><br /><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEh5uqZNKoCgna1gos7E7rzsIxuZmxKMkFz4zutXqOWoY8H1WWFIAgEz2mB6Dg2MhPNcyFMrQZszGPErCnzbUJ9egHwsv4Zd6qNureLS1JOA0E-V4r5-rP9nIAkU9u1B6jYmTAD2N_VEGgQ/s1600-h/Filter_02.png"><span style="font-family:arial;"><img style="TEXT-ALIGN: center; MARGIN: 0px auto 10px; WIDTH: 388px; DISPLAY: block; HEIGHT: 400px; CURSOR: hand" id="BLOGGER_PHOTO_ID_5380528538564219762" border="0" alt="" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEh5uqZNKoCgna1gos7E7rzsIxuZmxKMkFz4zutXqOWoY8H1WWFIAgEz2mB6Dg2MhPNcyFMrQZszGPErCnzbUJ9egHwsv4Zd6qNureLS1JOA0E-V4r5-rP9nIAkU9u1B6jYmTAD2N_VEGgQ/s400/Filter_02.png" /></span></a><br /><span style="font-family:arial;"></span><br /><ol><li><span style="font-family:arial;">Object= 'LINE' OR 'POLYLINE'</span></li><li><span style="font-family:arial;">Layer = 'MAJOR' OR 'MINOR'</span></li><li><span style="font-family:arial;">Block_Name = 'LINENO' AND Layer = 'LINE_NUM'</span></li><li><span style="font-family:arial;">Result of Step-1 AND Step-2</span></li><li><span style="font-family:arial;">Result of Step-3 AND Step-4.</span></li></ol><p><span style="font-family:arial;">If you represent the whole thing as a logical expression, it would look like the following statement;</span></p><p><span style="font-family:arial;color:#ff0000;">((( Object= 'LINE' <span style="color:#000099;">OR</span> 'POLYLINE') <span style="color:#000099;">AND</span> (Layer = 'MAJOR' <span style="color:#000099;">OR</span> 'MINOR')) <span style="color:#000099;">OR</span> (Block_Name ='LINENO' <span style="color:#000099;">AND</span> Layer = 'LINE_NUM'))</span></p><p><span style="font-family:arial;">If you have a closer look at the filter, you will find that the innermost criteria gets resolved first and passes its result to the outer ones in nested filters. In the above case, the criteria to be executed at the final stage is the outermost one (Step-5). </span></p><p><span style="font-family:Arial;">This way, you can save very complex filters in your drawing for quick access at any stage of drawing development or review. </span></p>har!shttp://www.blogger.com/profile/06728551650806056859noreply@blogger.com0tag:blogger.com,1999:blog-6000162925423321241.post-30437348126766049132009-08-28T03:53:00.001-07:002009-08-28T04:43:50.318-07:00Quick Tip - Start an MText List with a Number or Alphabet of Your Choice<span style="font-family:arial;">Last week I came across one of our designers using this nice trick and thought I would share it with you people. If you want to start a list inside MText window with a number or alphabet of your choice, try the following steps. </span><br /><ol><li><span style="font-family:arial;">Type the number or alphabet followed by a period (dot) symbol.</span></li><li><span style="font-family:arial;">Press the tab button after the period symbol</span></li><li><span style="font-family:arial;">Type the content of the first line (optional) and press enter key.</span></li></ol><p><span style="font-family:arial;">That's it. Now you will find the list starting with the number or alphabet you typed over there. Shown below is a sample list created using the above steps.</span></p><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEj10PJr2CO2TsxiMDqyAQ1CdFX3lFAjFvYoostsU_gx4yC6PiAl7AxWevxG6v8pZGMvoJpdclfWUV8tL9WvtsPF0SqwuLxDS8Rla20QxAQ9jlvdjDeZ7Mi4TCP2_NE06HSlVICw-PsxUVY/s1600-h/MText_List_01.png"><span style="font-family:arial;"><img style="TEXT-ALIGN: center; MARGIN: 0px auto 10px; WIDTH: 400px; DISPLAY: block; HEIGHT: 109px; CURSOR: hand" id="BLOGGER_PHOTO_ID_5374976989947440034" border="0" alt="" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEj10PJr2CO2TsxiMDqyAQ1CdFX3lFAjFvYoostsU_gx4yC6PiAl7AxWevxG6v8pZGMvoJpdclfWUV8tL9WvtsPF0SqwuLxDS8Rla20QxAQ9jlvdjDeZ7Mi4TCP2_NE06HSlVICw-PsxUVY/s400/MText_List_01.png" /></span></a><span style="font-family:arial;"> In addition to that, a little research on the subject helped me to prefix the list numbers with a custom text, as shown in the image below.<br /><br /></span><div><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgThfS4Icn-K41nF1vS-B0THH0fN3tCQy58C-cQ9h9vWmrrkDTARRlMn8l1LCPhdt0UV9sVHNPeJMMhHt3nLNjXd6WOZ_GliQAHVkmPWt3lCDsod54X68zh62U8mv4Wet-IXfcE2QoeskY/s1600-h/MText_List_02.png"><span style="font-family:arial;"><img style="TEXT-ALIGN: center; MARGIN: 0px auto 10px; WIDTH: 400px; DISPLAY: block; HEIGHT: 161px; CURSOR: hand" id="BLOGGER_PHOTO_ID_5374976815845727442" border="0" alt="" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgThfS4Icn-K41nF1vS-B0THH0fN3tCQy58C-cQ9h9vWmrrkDTARRlMn8l1LCPhdt0UV9sVHNPeJMMhHt3nLNjXd6WOZ_GliQAHVkmPWt3lCDsod54X68zh62U8mv4Wet-IXfcE2QoeskY/s400/MText_List_02.png" /></span></a><br /><div><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjnwjjacI0dCrSONDXx5eDTcCD9kaUWR_vAsAFqKfu4LvteDUYf8iJX9t3aCfIgR7KAGYmOXV6b16WUQrMVtoUMtq12hhDNdQ3NkiEI8UtqBltvaGWw3WzTOTA9WVbAtNq2oMKTOyCtEvU/s1600-h/MText_List_02.png"><span style="font-family:arial;"></span></a></div></div>har!shttp://www.blogger.com/profile/06728551650806056859noreply@blogger.com1tag:blogger.com,1999:blog-6000162925423321241.post-50911873637703514162009-08-12T07:12:00.000-07:002009-08-12T07:36:35.086-07:00Quick Tip - Generating a Drawing List from Different Folders Using Windows Command Prompt<span style="font-family:arial;">Most you might already know that typing <span style="color:#cc0000;">DIR <span style="color:#000066;">*.dwg</span> /B > </span><span style="color:#000066;">ListFileName</span> in the windows command prompt will provide you with a quick list of drawings in the specific location. What if you want to create a list with drawings from multiple folders? It's a really simple task. See the following sample to get to know the syntax.<br /><br /><span style="color:#cc0000;">DIR</span> <span style="color:#000066;">D:\Proj_Dir\Disc-1\*.dwg D:\Proj_Dir\Disc-2\*.dwg D:\Proj_Dir\Disc-3\*.dwg</span> <span style="color:#cc0000;">/B ></span> <span style="color:#000066;">D:\Proj_Dir\Dwg_List.txt</span><br /><br />As you can see, the paths are seperated by a space. Remember that the /B switch is still required to get the bare format file names. The above command will list all the drawing file names in the folders Disc-1, Disc-2 and Disc-3 to the Dwg_List.txt file. To access windows command prompt, either type <span style="color:#cc0000;">CMD</span> in the run prompt or locate it via Start--> All Programs --> Accessories --> Command Prompt.</span>har!shttp://www.blogger.com/profile/06728551650806056859noreply@blogger.com1tag:blogger.com,1999:blog-6000162925423321241.post-25889430527749166052009-07-14T09:21:00.000-07:002009-07-14T09:38:22.148-07:00How to Use DWG TrueView to Optimize Your Drawing Files<span style="font-family:arial;">Yet another reason to add <span class="blsp-spelling-error" id="SPELLING_ERROR_0">DWG</span> <span class="blsp-spelling-error" id="SPELLING_ERROR_1">TrueView</span> to your arsenal. <span class="blsp-spelling-error" id="SPELLING_ERROR_2">DWG</span> <span class="blsp-spelling-error" id="SPELLING_ERROR_3">TrueView</span> can be used as an excellent tool to optimize drawing files in batch. With facilities like purging, auditing, xref binding etc. <span class="blsp-spelling-error" id="SPELLING_ERROR_4">TrueView</span> has become truly <span class="blsp-spelling-corrected" id="SPELLING_ERROR_5">irresistible</span> for the CAD managers/<span class="blsp-spelling-corrected" id="SPELLING_ERROR_6">administrators</span>/users . Following are the steps involved in the process.<br /></span><span style="font-family:arial;"><br />1. Start <span class="blsp-spelling-error" id="SPELLING_ERROR_7">DWG</span> <span class="blsp-spelling-error" id="SPELLING_ERROR_8">TrueView</span> and open '<span class="blsp-spelling-error" id="SPELLING_ERROR_9">DWG</span> Convert' from the menu. It will launch the '<span class="blsp-spelling-error" id="SPELLING_ERROR_10">DWG</span> Convert' dialog box. </span><br /><br /><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhEGmxDLv8RfkUT9CFQPeCec4n3IpqqvhpajP1h-7iwAc3klFauz4ATf7Wjh5KGK298nyQX6UapUfzXVXg-oQAx95JHA6sXxLdlCRXR3hlomED6QHADe2gZgm9YSP43YFBwcmK6fbsqY-c/s1600-h/Dwg_Optimizer_01.png"><span style="font-family:arial;"><img id="BLOGGER_PHOTO_ID_5358352389968200738" style="DISPLAY: block; MARGIN: 0px auto 10px; WIDTH: 400px; CURSOR: hand; HEIGHT: 354px; TEXT-ALIGN: center" alt="" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhEGmxDLv8RfkUT9CFQPeCec4n3IpqqvhpajP1h-7iwAc3klFauz4ATf7Wjh5KGK298nyQX6UapUfzXVXg-oQAx95JHA6sXxLdlCRXR3hlomED6QHADe2gZgm9YSP43YFBwcmK6fbsqY-c/s400/Dwg_Optimizer_01.png" border="0" /></span></a><span style="font-family:arial;"><br />2. Click on the 'Conversion Setups' button to open 'Conversion Setups' dialog box. Our idea is to create an exclusive setup for our <span class="blsp-spelling-corrected" id="SPELLING_ERROR_11">optimization</span> process.<br /></span><br /><div><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEj5e8T0j0-kOsYnDmTDK0-YASUgvUZhgs-Uq9YFzOVdHkyIvltxmUwtJ-IaLipM9EjF7rL3oSHRP6QxiCqJkU3BURlIPa6tma34YaHxdawxTtAwswwSyo-aVKjXedlny7i9ZHS-blD71bs/s1600-h/Dwg_Optimizer_02.png"><span style="font-family:arial;"><img id="BLOGGER_PHOTO_ID_5358352111434595746" style="DISPLAY: block; MARGIN: 0px auto 10px; WIDTH: 362px; CURSOR: hand; HEIGHT: 296px; TEXT-ALIGN: center" alt="" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEj5e8T0j0-kOsYnDmTDK0-YASUgvUZhgs-Uq9YFzOVdHkyIvltxmUwtJ-IaLipM9EjF7rL3oSHRP6QxiCqJkU3BURlIPa6tma34YaHxdawxTtAwswwSyo-aVKjXedlny7i9ZHS-blD71bs/s400/Dwg_Optimizer_02.png" border="0" /></span></a><span style="font-family:arial;"><br />3. Click on 'New' button to launch 'New Conversion Setup' dialog box and provide a meaningful name over there.<br /></span><br /><div><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgKHyVUiEYBCOPIpFltmywHs8ieb_xEIRMom-hw2O8mfr77E79IPevFJqcOoYwoZfFEOu0pfNdtLR1wayDJWpMZKsURgMmtkvnKPTmxm1N9apGn2z9APDJMFYabS-MEIdEEw6Z9nGl4RIA/s1600-h/Dwg_Optimizer_03.png"><span style="font-family:arial;"><img id="BLOGGER_PHOTO_ID_5358352115530836098" style="DISPLAY: block; MARGIN: 0px auto 10px; WIDTH: 350px; CURSOR: hand; HEIGHT: 214px; TEXT-ALIGN: center" alt="" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgKHyVUiEYBCOPIpFltmywHs8ieb_xEIRMom-hw2O8mfr77E79IPevFJqcOoYwoZfFEOu0pfNdtLR1wayDJWpMZKsURgMmtkvnKPTmxm1N9apGn2z9APDJMFYabS-MEIdEEw6Z9nGl4RIA/s400/Dwg_Optimizer_03.png" border="0" /></span></a><span style="font-family:arial;"><br />4. Clicking on 'Continue' button will <span class="blsp-spelling-corrected" id="SPELLING_ERROR_12">pop up</span> the 'Modify Conversion Setup' dialog box. Here I am going to use the basic settings. You may choose the options as per your requirement. Since our aim is to optimize the drawings (drawing format conversion is not our primary objective), I prefer to use 'In-place (overwrite files)' as my conversion package type. Choose the drawing file format based upon your company/client CAD standards (We normally use <span class="blsp-spelling-error" id="SPELLING_ERROR_13">AutoCAD</span> 2007 format as we are still on <span class="blsp-spelling-error" id="SPELLING_ERROR_14">AutoCAD</span> 2008). In the actions area, select 'Check and fix errors' and 'Purge drawings' check boxes as a minimum. Don't forget to provide a conversion setup description at the bottom in order to easily make out the setup objective later on.<br /></span><br /><div><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEihSgDsYCTGlXQWy1VImaQ1JFKtKjmi6JiCD4c0yno4GLoXB0Gsflvq8o_pnLBIx4h8-NxciiqN4UDGcvYIBvWnohW76K1sTjL5CQ2TmVWDIVZMWcbMsuibICndOJo7Q77xu0hNPaWcOGM/s1600-h/Dwg_Optimizer_04.png"><span style="font-family:arial;"><img id="BLOGGER_PHOTO_ID_5358352108457354370" style="DISPLAY: block; MARGIN: 0px auto 10px; WIDTH: 400px; CURSOR: hand; HEIGHT: 346px; TEXT-ALIGN: center" alt="" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEihSgDsYCTGlXQWy1VImaQ1JFKtKjmi6JiCD4c0yno4GLoXB0Gsflvq8o_pnLBIx4h8-NxciiqN4UDGcvYIBvWnohW76K1sTjL5CQ2TmVWDIVZMWcbMsuibICndOJo7Q77xu0hNPaWcOGM/s400/Dwg_Optimizer_04.png" border="0" /></span></a><span style="font-family:arial;"><br />5. Click '<span class="blsp-spelling-error" id="SPELLING_ERROR_15">Ok</span>' to finalise the setup. You can see the new setup name listed in the 'Conversion Setups' list box.<br /></span><br /><div><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEibKR5m31D0jm-nDg5yAMyI4lW9xSZGmrCoWJqDgBBK34Tq1IkKLQM1DsH8XNRvPKJnME2MjspqY6gJfrTUmuQv2FV5U6uBB1TDfdgA8IbD40ruKypqChm5Jd_NYm6PCNQXZNrsrMB0mmk/s1600-h/Dwg_Optimizer_05.png"><span style="font-family:arial;"><img id="BLOGGER_PHOTO_ID_5358352104638671762" style="DISPLAY: block; MARGIN: 0px auto 10px; WIDTH: 400px; CURSOR: hand; HEIGHT: 246px; TEXT-ALIGN: center" alt="" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEibKR5m31D0jm-nDg5yAMyI4lW9xSZGmrCoWJqDgBBK34Tq1IkKLQM1DsH8XNRvPKJnME2MjspqY6gJfrTUmuQv2FV5U6uBB1TDfdgA8IbD40ruKypqChm5Jd_NYm6PCNQXZNrsrMB0mmk/s400/Dwg_Optimizer_05.png" border="0" /></span></a><span style="font-family:arial;"><br />6. Close the dialog box to go back to the '<span class="blsp-spelling-error" id="SPELLING_ERROR_16">DWG</span> Convert' dialog box. Add the drawing files to be optimized using the 'Add file' button in the bottom side. Once the drawings have been added, make sure that the recently created conversion setup is selected in the list. That's it. Just click on convert button and the <span class="blsp-spelling-error" id="SPELLING_ERROR_17">TrueView</span> application will do the rest for you.<br /></span><br /><div><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhcuP4Oz52108yPOPMqTFWgwNS4a4O5sVvIy9nHh8Q96U5eaRpngJKoUmuF_v6BzE83q3Vz-OaCaFcdvEUiWosiPh9BIaGkpernDAZS9y98ET1SkEox6l4dSiu8jY7y7P7ZiIp8B9DXqoU/s1600-h/Dwg_Optimizer_06.png"><span style="font-family:arial;"><img id="BLOGGER_PHOTO_ID_5358352100648847362" style="DISPLAY: block; MARGIN: 0px auto 10px; WIDTH: 400px; CURSOR: hand; HEIGHT: 354px; TEXT-ALIGN: center" alt="" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhcuP4Oz52108yPOPMqTFWgwNS4a4O5sVvIy9nHh8Q96U5eaRpngJKoUmuF_v6BzE83q3Vz-OaCaFcdvEUiWosiPh9BIaGkpernDAZS9y98ET1SkEox6l4dSiu8jY7y7P7ZiIp8B9DXqoU/s400/Dwg_Optimizer_06.png" border="0" /></span></a><span style="font-family:arial;"><br />Once the setup is made, you can use the same setup every time you need to optimize the drawings. Really cool, isn't it? The entire process consumes only a little time and resources. In case you haven't installed <span class="blsp-spelling-error" id="SPELLING_ERROR_18">AutoCAD</span> 2010 yet, <span class="blsp-spelling-error" id="SPELLING_ERROR_19">TrueView</span> is a must for you as it can bring 2010 format files down to your <span class="blsp-spelling-error" id="SPELLING_ERROR_20">AutoCAD</span> version compatible format. What else you need to get it installed on your system? <span class="blsp-spelling-error" id="SPELLING_ERROR_21">DWG</span> <span class="blsp-spelling-error" id="SPELLING_ERROR_22">TrueView</span> and <span class="blsp-spelling-error" id="SPELLING_ERROR_23">Autodesk</span> Design Review are FREE and can be downloaded from the <a href="http://www.autodesk.com/"><span class="blsp-spelling-error" id="SPELLING_ERROR_24">Autodesk</span></a> site. </span></div></div></div></div></div>har!shttp://www.blogger.com/profile/06728551650806056859noreply@blogger.com1tag:blogger.com,1999:blog-6000162925423321241.post-79928139967711768762009-07-07T09:08:00.001-07:002009-07-07T09:40:43.917-07:00DATAEXTRACTION Means A Lot More Than Simple Attribute Extraction<span style="font-family:arial;">How often do you use DATAEXTRACTION wizard for extracting some information other than block attribute data? I have often seen people leaving it behind for tasks like extracting specific text information mentioning that this tool is not powerful enough to get an accurate output. That's not true. Here I am going to show you how to extract a line list from a bunch of Piping & Instrumentation Diagrams (P&ID). The P&IDs contains a lot of other text objects. But with the help of some filtering options, you can extract only the required text information from the drawing.<br /><br /></span><span style="font-family:arial;">1. Start DATAEXTRACTION wizard<br /></span><br /><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhx-6DT0A2A58BgQOMIYnzxHmaonYDaXT49odMr9vAUqqH85PW18TlPECbJtxT-QeZz6wAYmPOnDA8_ngP4v_eBli7_n-cu-5IU1rFts4Wrago1KXWZ0siRv0PncBfuOkVUc0u0CBBJmEQ/s1600-h/DataEx_01.png"><span style="font-family:arial;"><img id="BLOGGER_PHOTO_ID_5355751253857676642" style="DISPLAY: block; MARGIN: 0px auto 10px; WIDTH: 400px; CURSOR: hand; HEIGHT: 272px; TEXT-ALIGN: center" alt="" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhx-6DT0A2A58BgQOMIYnzxHmaonYDaXT49odMr9vAUqqH85PW18TlPECbJtxT-QeZz6wAYmPOnDA8_ngP4v_eBli7_n-cu-5IU1rFts4Wrago1KXWZ0siRv0PncBfuOkVUc0u0CBBJmEQ/s400/DataEx_01.png" border="0" /></span></a><span style="font-family:arial;"> 2. Select the required P&ID drawings (Here I am using sample ones).<br /><br /></span><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgXoRWMVhEdtP89ZxhYemjDv48XH1AwVGn6h69sLgT5qlKMu2ZDE0Yzwu0NFvgoWc7qsVZaQDVy0frgYgeN6VW2ymNN0F51-H7lyIdRKod14C6dknhbMeZjbc6gRD1RE_H7hEwYccZKimM/s1600-h/DataEx_02.png"><span style="font-family:arial;"><img id="BLOGGER_PHOTO_ID_5355751258022378658" style="DISPLAY: block; MARGIN: 0px auto 10px; WIDTH: 400px; CURSOR: hand; HEIGHT: 272px; TEXT-ALIGN: center" alt="" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgXoRWMVhEdtP89ZxhYemjDv48XH1AwVGn6h69sLgT5qlKMu2ZDE0Yzwu0NFvgoWc7qsVZaQDVy0frgYgeN6VW2ymNN0F51-H7lyIdRKod14C6dknhbMeZjbc6gRD1RE_H7hEwYccZKimM/s400/DataEx_02.png" border="0" /></span></a><span style="font-family:arial;"> 3. In the third page select only 'Text' as object type.(Tip: You can uncheck all entries simultaneously by using right click).<br /><br /></span><div><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgvZLBbybC0iChS-uSCymJMFFPxTOig78uOz4XGtI2fQ3GMD8gcUWSnlm4SEX_aXwPwZTaO1AHe-Piw0QbC2Kmch3yfmjrnXTkvZowftdodGxST4yPZmKyFMjWXOYuDmUfxdnz-oNbTMB4/s1600-h/DataEx_03.png"><span style="font-family:arial;"><img id="BLOGGER_PHOTO_ID_5355751263136375314" style="DISPLAY: block; MARGIN: 0px auto 10px; WIDTH: 400px; CURSOR: hand; HEIGHT: 267px; TEXT-ALIGN: center" alt="" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgvZLBbybC0iChS-uSCymJMFFPxTOig78uOz4XGtI2fQ3GMD8gcUWSnlm4SEX_aXwPwZTaO1AHe-Piw0QbC2Kmch3yfmjrnXTkvZowftdodGxST4yPZmKyFMjWXOYuDmUfxdnz-oNbTMB4/s400/DataEx_03.png" border="0" /></span></a><span style="font-family:arial;"> 4. In the fourth page, select 'Drawing' and 'Text' in the category filter. Also select 'File Name' and 'Value' in the properties area.<br /><br /></span><div><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgFTEE9y5-4sLo1kSlDsgAI-Wdm5dzy8IaoXZ5FNKlLSYDL37nNMxktL0msit4jU6_iW00AP2dR-FYqEhiS-elOyf-2Hh_wM4lHfGCZ3298ZSaoWukHbxrhbr1YupowLcHn9HwZwIBE4X8/s1600-h/DataEx_04.png"><span style="font-family:arial;"><img id="BLOGGER_PHOTO_ID_5355751266934510034" style="DISPLAY: block; MARGIN: 0px auto 10px; WIDTH: 400px; CURSOR: hand; HEIGHT: 305px; TEXT-ALIGN: center" alt="" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgFTEE9y5-4sLo1kSlDsgAI-Wdm5dzy8IaoXZ5FNKlLSYDL37nNMxktL0msit4jU6_iW00AP2dR-FYqEhiS-elOyf-2Hh_wM4lHfGCZ3298ZSaoWukHbxrhbr1YupowLcHn9HwZwIBE4X8/s400/DataEx_04.png" border="0" /></span></a><span style="font-family:arial;"> 5. In the refine data page, you will get a screen similar to the one shown below. This is the area where we are going to play our game. You will notice that the value field contains various text object values from different drawings. We need to confine the list to line numbers.<br /><br /></span><div><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiHwn_xXp9jHRRgoNg8w5acRwXK_FbCKl6zSawLTUKqhK2J2aAX9C7Ac7koAUjmFjnZEIAJVOOoPXW3BdBuaA7L1_SUBQDuWQDJ0ZWAvoNS_qtRvybJsPLWpIiGghKjwOWZzz9Zwi-i4Jo/s1600-h/DataEx_05.png"><span style="font-family:arial;"><img id="BLOGGER_PHOTO_ID_5355751264238680194" style="DISPLAY: block; MARGIN: 0px auto 10px; WIDTH: 400px; CURSOR: hand; HEIGHT: 267px; TEXT-ALIGN: center" alt="" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiHwn_xXp9jHRRgoNg8w5acRwXK_FbCKl6zSawLTUKqhK2J2aAX9C7Ac7koAUjmFjnZEIAJVOOoPXW3BdBuaA7L1_SUBQDuWQDJ0ZWAvoNS_qtRvybJsPLWpIiGghKjwOWZzz9Zwi-i4Jo/s400/DataEx_05.png" border="0" /></span></a><span style="font-family:arial;"> 6. Now right click on the value column and select 'Filter Options' from the right click menu.<br /><br /></span><div><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgUW1pcfJfUKTAwwdTiRK3UjLbVJ2ayiDPVCkFD7C_a5AJdFIgp9j2Z3RSspPiRFzxznhjXd596ckY1yZB-yh0ZqEq9wwGoSteY11u1jtk10U1u-_92qe8fjmPHaKInaAZuyFdsQ_3MJVE/s1600-h/DataEx_06.png"><span style="font-family:arial;"><img id="BLOGGER_PHOTO_ID_5355751636223278402" style="DISPLAY: block; MARGIN: 0px auto 10px; WIDTH: 400px; CURSOR: hand; HEIGHT: 321px; TEXT-ALIGN: center" alt="" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgUW1pcfJfUKTAwwdTiRK3UjLbVJ2ayiDPVCkFD7C_a5AJdFIgp9j2Z3RSspPiRFzxznhjXd596ckY1yZB-yh0ZqEq9wwGoSteY11u1jtk10U1u-_92qe8fjmPHaKInaAZuyFdsQ_3MJVE/s400/DataEx_06.png" border="0" /></span></a><span style="font-family:arial;"> 7. You will be provided with a filter dialog box as shown in the image below. For our purpose, select the 'Contains' list item from the first list box and type in a wildcard criteria <strong>*"-*</strong> in the second list box as shown in the picture.<br /><br /></span><div><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhBJ5AKBSLlfsGOhIg8tssqKRDWD-j77x0-2Yg7YqBGJcU0QDJa6ih4XcT3KtQvz7080UV5NN-CtyWawHGlatb8WMZ16_BtQvy4bMzhDdWMzyo6OH2yTo37BnwiwCmXR5UXDekS6HwjZh0/s1600-h/DataEx_07.png"><span style="font-family:arial;"><img id="BLOGGER_PHOTO_ID_5355751645592835042" style="DISPLAY: block; MARGIN: 0px auto 10px; WIDTH: 259px; CURSOR: hand; HEIGHT: 395px; TEXT-ALIGN: center" alt="" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhBJ5AKBSLlfsGOhIg8tssqKRDWD-j77x0-2Yg7YqBGJcU0QDJa6ih4XcT3KtQvz7080UV5NN-CtyWawHGlatb8WMZ16_BtQvy4bMzhDdWMzyo6OH2yTo37BnwiwCmXR5UXDekS6HwjZh0/s400/DataEx_07.png" border="0" /></span></a><span style="font-family:arial;"> 8. Click 'Ok' to apply the filter. Now you can see the value column filtered to show only line numbers based upon the given criteria.<br /><br /></span><div><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhQjStOh95E3nCRnG30QFfgRPWEqDBF3g-HZBs3A7NgtzaDXmY-QjTBQUdu1t04OBgWH8tYOpYtwrwNHrZKBXiAqh0Kf5YOAnZ0BQkmmwkslLFu6yGeN-xoAJNuOQYj5GaePrghTvh237c/s1600-h/DataEx_08.png"><span style="font-family:arial;"><img id="BLOGGER_PHOTO_ID_5355751646843905826" style="DISPLAY: block; MARGIN: 0px auto 10px; WIDTH: 400px; CURSOR: hand; HEIGHT: 282px; TEXT-ALIGN: center" alt="" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhQjStOh95E3nCRnG30QFfgRPWEqDBF3g-HZBs3A7NgtzaDXmY-QjTBQUdu1t04OBgWH8tYOpYtwrwNHrZKBXiAqh0Kf5YOAnZ0BQkmmwkslLFu6yGeN-xoAJNuOQYj5GaePrghTvh237c/s400/DataEx_08.png" border="0" /></span></a><span style="font-family:arial;"> 9. Click on 'Next' button and save the output as an excel file or table.<br /><br /></span><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEilQ5cazVnY-efbCmxHBq9Ee8T7I5dVyzkrAMsbC40oqIJ20qEazYJANEHyI-3F8Dz4p6aV3obvIRYwovVOvlCA7n9UiDcbfq9Yn_5bADfl2gXgc-PknAmN6QUuiD5no6DQnIOrJxnC1Qs/s1600-h/DataEx_09.png"><span style="font-family:arial;"><img id="BLOGGER_PHOTO_ID_5355751650599968546" style="DISPLAY: block; MARGIN: 0px auto 10px; WIDTH: 400px; CURSOR: hand; HEIGHT: 267px; TEXT-ALIGN: center" alt="" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEilQ5cazVnY-efbCmxHBq9Ee8T7I5dVyzkrAMsbC40oqIJ20qEazYJANEHyI-3F8Dz4p6aV3obvIRYwovVOvlCA7n9UiDcbfq9Yn_5bADfl2gXgc-PknAmN6QUuiD5no6DQnIOrJxnC1Qs/s400/DataEx_09.png" border="0" /></span></a><span style="font-family:arial;"><br />You can easily create various lists from your drawings irrespective of the data containers. Whether it be attribute or text, DATAEXTRACTION is powerful enough to pull the required data based upon different conditions. As the wildcard criteria plays a critical role in extracting the specific data, you need to be very careful to choose the right criteria in order to get proper results.<br /><br />On a side note, I feel like the command name is a bit too long. It would be a lot better if it were something like <strong>DATAXTRACT</strong> or even shorter. Anyway, that's not a matter of a concern as we don't use this command very frequently.<br /></span></div></div></div></div></div></div>har!shttp://www.blogger.com/profile/06728551650806056859noreply@blogger.com2tag:blogger.com,1999:blog-6000162925423321241.post-21440889205275401712009-05-21T13:17:00.000-07:002009-05-21T13:24:42.386-07:00Some Interesting Single Key Shortcuts in Autodesk Design Review<span style="font-family:arial;">For the keyboard fans, who don't like working with menus and ribbons, there are several easy to use keyboard shortcuts inside ADR to make your life a lot easier. Some of those deserve a special mention for the fact that they are single key shortcuts. Using these shortcuts, the navigation options seem to be as easy as in AutoCAD, or even better. Here goes some of the single key shortcuts those caught my eyes at first sight.<br /><br /><strong>R</strong> - Zoom Rectangle<br /><strong>F</strong> - Fit to Window<br /><strong>Q</strong> - Dynamic Zoom<br /><strong>H</strong> - Pan<br /><strong>PgUp</strong> - Next Page<br /><strong>PgDn</strong> - Previous Page<br /><strong>G</strong> - Length (Dimension)<br /><strong>N</strong> - Full Screen (Toggle)<br /><br />I personally found the 'R' and 'F' shortcuts combination so terrific that it could easily beat the speed of Z+W and Z+E combination in AutoCAD. For a full list of ADR shortcuts, please refer to the help section inside the application. Unfortunately, I could not find any equivalent shortcut keys for DWG TrueView. If it's not available in TrueView, Autodesk should seriously consider incorporating it, atleast for the navigation options. For sure, these applications are going to be more and more popular in the future. </span>har!shttp://www.blogger.com/profile/06728551650806056859noreply@blogger.com1tag:blogger.com,1999:blog-6000162925423321241.post-5242777603375110012009-04-15T10:56:00.000-07:002009-04-15T11:32:40.957-07:00How To Use Autodesk Design Review As Your Default Raster Image Viewer<span style="font-family:arial;">Have you had a lot of headache in the past for viewing raster files those are not supported by windows built in image viewer applications? Don't worry, the solution is right under your nose. Apart from serving as an excellent review application, Autodesk Design Review can also be used as a raster image viewer. That means, you don't have to attach the raster images inside AutoCAD to view the contents. Instead, you can directly double click it on the explorer so that it opens directly in the Design Review application. Please make sure that you have done the following steps.<br /></span><br /><span style="font-family:arial;">1. Goto Control Panel and double click on 'Folder Options'.</span><br /><span style="font-family:arial;">2. Goto the 'File Types' tab.</span><br /><span style="font-family:arial;">3. Locate the raster file extension inside the 'registered file types' list</span><br /><span style="font-family:arial;">4. If the extension does not exist, then click on 'New' to create a new one.<br /></span><br /><p><span style="font-family:arial;"><img id="BLOGGER_PHOTO_ID_5324979048777958050" style="DISPLAY: block; MARGIN: 0px auto 10px; WIDTH: 400px; CURSOR: hand; HEIGHT: 361px; TEXT-ALIGN: center" alt="" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiplmmbyNQVbkvP4uGLxrf9rciasMpV9yHPayCoNpjHpxqq5oh0objgXQCsLvxqS6RsIG5UuV_i5V6fSSfdR7u14Bnv-PaHVc93OlBonIq24YqtMbjMcqRGLP1E_XDLsCDbybJxJuYb6U0/s400/DesRev_Rst_View_01.png" border="0" />5. Select the extension from the list and click on 'Change' button shown in the details section.</span></p><p><span style="font-family:arial;"><img id="BLOGGER_PHOTO_ID_5324979055188105154" style="DISPLAY: block; MARGIN: 0px auto 10px; WIDTH: 325px; CURSOR: hand; HEIGHT: 400px; TEXT-ALIGN: center" alt="" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhgBF7hVN8iSflPOcuiL6a7IWPMGXACt47rP5wyWJgpTGq8byJU-K7Z8Y8SGLX-8Y7QS7jc7LNvJCXW6fGePEJUlKhUAHPRTJ8RK-HxFD-BnN36pTmlyhst0cr2fDd1A-18aZjRRQATNaQ/s400/DesRev_Rst_View_02.png" border="0" /></span></p><p><span style="font-family:arial;">6. From the next popup window, choose 'Select the program from a list' option.</span></p><p><span style="font-family:arial;"><img id="BLOGGER_PHOTO_ID_5324979051707763954" style="DISPLAY: block; MARGIN: 0px auto 10px; WIDTH: 400px; CURSOR: hand; HEIGHT: 253px; TEXT-ALIGN: center" alt="" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhYF2r48XEZwRL-o_Qa5XMKBqyrK2oyfLWK3jkkGTuakLYyaUJFUcEeJDpL92dk_DD7ssZbIVw85pPPS1moSFHqySkUitcj4epswM-sPDJuhteqPXdrpQqoC63bxTuIRL98c7DeGSQwx3A/s400/DesRev_Rst_View_03.png" border="0" />7. Choose Autodesk DWF Application as the preferred application to open files with this extension. Also remember to check the 'Always use the selected program to open this kind of file' check box shown right under the list.</span></p><p><span style="font-family:arial;"><img id="BLOGGER_PHOTO_ID_5324979057449259954" style="DISPLAY: block; MARGIN: 0px auto 10px; WIDTH: 336px; CURSOR: hand; HEIGHT: 400px; TEXT-ALIGN: center" alt="" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhCGV9MPhhzVECouLsbE6Eze56HYp3QdQ8jHB-EeIBl-_Vn7MRgLNMkdJLdhrA8Q1N9H1x2CiT-Yh4bhr08DKb7XWg22IfIwtStYZW_6ijfbrM59xDT41Sw4Wj3EUxLuxhqXoPRvba4JMs/s400/DesRev_Rst_View_04.png" border="0" /></span></p><p><span style="font-family:arial;">8. If everything is done properly, it will look as shown in the image below.</span></p><p><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiBHa0BtFR0-OYa_uZS5iLjxMBDDEaVH_Ou3_NFxdaYfuXVqUOWQtEhVgBx5Q4LD2wZ3H6sqY1lzRxZ0DBKnfW_bBzkXSi-S9VI6HSdlSVU-mtm7aBA78LxDRkV8z9elJtho3HFoMcg2wU/s1600-h/DesRev_Rst_View_05.png"><span style="font-family:arial;"><img id="BLOGGER_PHOTO_ID_5324979057892291202" style="DISPLAY: block; MARGIN: 0px auto 10px; WIDTH: 325px; CURSOR: hand; HEIGHT: 400px; TEXT-ALIGN: center" alt="" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiBHa0BtFR0-OYa_uZS5iLjxMBDDEaVH_Ou3_NFxdaYfuXVqUOWQtEhVgBx5Q4LD2wZ3H6sqY1lzRxZ0DBKnfW_bBzkXSi-S9VI6HSdlSVU-mtm7aBA78LxDRkV8z9elJtho3HFoMcg2wU/s400/DesRev_Rst_View_05.png" border="0" /></span></a><span style="font-family:arial;"><br />That's it. Repeat the same steps for other types of raster files. Once done, you don't have worry about it any more. Now you can goto explorer and double click those files to open it directly inside the Design Review application. I have configured mine to view file types like CAL, CALS, GP4, CG4, MIL, RST, PCT, PICT, TGA, RLS etc. (testing pending for some types). The best part of the story is that you can easily save this image as a DWF(x) file in order to send it to somebody for review purpose.<br /><br />Autodesk Design Review is a wonderful review application with exciting features like '2D content comparison', 'PDF Support' etc. It's free and can be downloaded from the <a href="http://usa.autodesk.com/adsk/servlet/index?id=4086277&siteID=123112">Autdesk Design Review site</a>.<br /></span></p>har!shttp://www.blogger.com/profile/06728551650806056859noreply@blogger.com2tag:blogger.com,1999:blog-6000162925423321241.post-53724505230003395392009-01-25T04:42:00.000-08:002009-01-26T04:33:30.245-08:00Assigning Multiple Double Click Actions to Single Entity Type in AutoCAD<span style="font-family:arial;">In the <a href="http://cadingandcoding.blogspot.com/2007/09/unleash-double-click-power.html">Unleash the Double Click Power</a> post, you saw how to customize the double click action of an entity type to implement custom double click actions. Now we are going to see how we can implement different double click actions simultaneously on single entity type. Normally, we accomplish this by using Reactors or Events in the respective languages. But, we are not going to use any of these in our method. Rather, we will follow a tricky way to achieve the same result.<br /><br />As an example, I will show you how to change the double click action of an 'Attribute Block'. Normally double clicking an attribute block shows the Enhanced Attribute Editor Dialog. We are going to change this to show either Enhanced Attribute Editor(_eattedit) or Edit Attributes dialog (_attedit) depending on certain condition. Let's say, when we double click on a title block named TITLE_BLOCK, it should display the Enhanced Attribute Editor dialog and for all other blocks in the drawing, it should display Edit Attributes dialog. The step by step configuration is given below.</span><br /><br /><ol><br /><li><span style="font-family:arial;">Open CUI and create a custom command with the following code inside the macro section of the command. If you don't know how to create a custom command, then refer to the 'Unleash the Double Click Power' post mentioned above. Replace the 'TITLE_BLOCK' inside the following code with your actual title block name.<br /><span style="color:#cc0000;">^C^C(if (= (cdr (assoc 2 (entget (ssname (ssget "P") 0)))) "TITLE_BLOCK") (command "_eattedit")(command "_ddatte" ))</span></span><span style="font-family:arial;"></li></span><br /><li><span style="font-family:arial;">Drag and drop the custom command under the 'Attribute Block' section inside the Double Click Actions.<br /></span></li><br /><li><span style="font-family:Arial;">Click on 'Apply' and close the CUI dialog.</span><span style="font-family:arial;"><br /></li></ol></span><p><br /></p><span style="font-family:arial;"></span><br /><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgSqGZrty2-X-Q3uQ32t9gI4YOGmXmwxNca5EzLQ6t81l96fLL_8nf_mmOGCgZOtTAwDT4T_GtfakwOxOMSDoBDZ70t5LpReM6Hy1zeyYeggKpqi_COyWfbqzgxF3Aq9i-mhxmD-3BSkGA/s1600-h/Multi_Dbl_Clickz.png"><img id="BLOGGER_PHOTO_ID_5295211188320279522" style="DISPLAY: block; MARGIN: 0px auto 10px; WIDTH: 400px; CURSOR: hand; HEIGHT: 265px; TEXT-ALIGN: center" alt="" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgSqGZrty2-X-Q3uQ32t9gI4YOGmXmwxNca5EzLQ6t81l96fLL_8nf_mmOGCgZOtTAwDT4T_GtfakwOxOMSDoBDZ70t5LpReM6Hy1zeyYeggKpqi_COyWfbqzgxF3Aq9i-mhxmD-3BSkGA/s400/Multi_Dbl_Clickz.png" border="0" /></a><br /><br /><div><span style="font-family:arial;">That's it. Now if you double click on the title block, it will open the Enhanced Attribute Editor dialog and for all other attributed blocks, it will open Edit Attributes dialog. By the way, don't forget to take a backup of the default CUI files before you start experimenting with them.</span> </div>har!shttp://www.blogger.com/profile/06728551650806056859noreply@blogger.com0tag:blogger.com,1999:blog-6000162925423321241.post-91228746861145817692009-01-18T04:37:00.000-08:002009-01-18T04:43:55.161-08:00Quick Tip - A Shortcut for Closing Active Drawing<span style="font-family:arial;">You already know that ALT+F4 can effectively be used to quit a running application in windows operating system. For those who don't know, pressing CTRL+F4 inside AutoCAD will close the active drawing without touching the application or other drawings already open over there. Though it's a more straight forward shortcut than the ALT+F+C, I would like to stick to the latter as it looks easier to me (May be because I am used to that). CTRL+F4 shortcut is not limited to AutoCAD, but it works well with almost all windows multi document interface (MDI) applications.</span>har!shttp://www.blogger.com/profile/06728551650806056859noreply@blogger.com1tag:blogger.com,1999:blog-6000162925423321241.post-57372932426870237392009-01-04T03:55:00.000-08:002009-01-04T04:04:01.489-08:00My New Year Wish - An Intermediate AutoCAD Product for 2D Designing & Draughting<span style="font-family:arial;">Why? Let's have a look at the existing product line. ie, Vanilla AutoCAD and AutoCAD LT. You might be able to find an answer from there.<br /><br /><strong>AutoCAD LT</strong>: The lack of strong application programming interfaces makes AutoCAD LT really handicapped in the perspective of a Power User or CAD Administrator. You can not use any of your custom commands developed using AutoLISP/VBA/Dotnet/ObjectARX inside LT. The remaining option called DIESEL is only good enough to make small macros. Not only that; the number of commands are limited as compared to the full version.<br /><br /><strong>Vanilla AutoCAD</strong>: Very powerful platform for 2D as well as 3D designing and modeling. The disadvantage is that it's loaded with comprehensive 3D modeling and rendering engines which are not at all used by the 2D user. Believe me; I have never used any of the 3D modeling or rendering features for the past 4 or 5 years for official purpose. That means the 2D users are carrying a burden over their shoulders and have been quite unnecessarily paying for the unwanted features. They could work much faster, if all those unwanted features were not loaded over there. The recent versions of AutoCAD show that it is more inclined towards 3D development than the 2D ones.<br /><br />The need of the moment is an intermediate AutoCAD Product, which offers the power of Vanilla AutoCAD customization and 2D features minus all the 3D/rendering features with an attractive price tag. In that case, managers don't have to think twice at the time of purchase/upgrade of the product as they normally would do. As of now, we are forced to use Vanilla AutoCAD as we have in-house discipline specific menus and associated programs.<br /><br />I am sorry to have started the New Year in a rebellion mood. But we really wish to see such a product available in the industry. Please note that the above views and opinions are my personal ones and those don't reflect the views or policies of the company I am working for. I take this opportunity to wish you a happy and prosperous new year. May the New Year make our dreams (including the CAD related ones ;-) come true...!! Many thanks to all you people for visiting my blog.</span>har!shttp://www.blogger.com/profile/06728551650806056859noreply@blogger.com2tag:blogger.com,1999:blog-6000162925423321241.post-88511598378522125232008-11-19T23:03:00.001-08:002008-11-19T23:13:55.557-08:00Developing a Sine Wave Generator using DIECAL<span style="font-family:arial;">In the <strong><a href="http://cadingandcoding.blogspot.com/2008/11/diecal-its-diesel-enhanced-with.html">last post</a></strong>, we saw how easiy we could accomplish complicated operations using DIECAL. Further to that, we are going develop a sine wave generator using a few lines of code. I know that you don't have a sine wave generator even in your wildest DIESEL dreams. But it is a really simple task using DIECAL. Once again, I am going to use points in order to make it simple. For generating sine wave, use the following macro.</span><br /><br /><span style="font-family:arial;color:#cc0000;">*^C^C_setvar;userr1;$M=$(+,$(getvar,userr1),$(getvar,userr2))$(if,$(>=,$(*,$(+,$(getvar,userr1),$(getvar,userr2)),10),$(*,$(getvar,userr3),360)),^C)_Point;'CAL;[$(getvar,userr4)+$(+,$(getvar,userr1),$(getvar,userr2))/18,sin(10*$(+,$(getvar,userr1),$(getvar,userr2)))];</span><br /><br /><span style="font-family:arial;">The above macro makes use of USERR1 to USERR4 system variables. The USERR1 and USERR2 values are automatically set by the set/reset macro (given below). USERR3 holds the value for number of cycles created and USERR4 is for X axis lag value (See the sample image). Use the following macro to set/reset initial values. When you run this macro, just follow the status bar messages.</span><br /><br /><span style="font-family:arial;color:#cc0000;">^C^C_setvar;userr1;-1;;userr2;1;userr3;1;_modemacro;Enter number of cycles:;userr3;\userr4;0;_modemacro;Enter lag value for X axis:;setvar;userr4;\_modemacro;.;</span><br /><br /><span style="font-family:arial;">The following image illustrates three sine waves gererated with a cycle value of 3 and X axis lag value 0 (Red) .22 (Green) and .44(Yellow).</span><br /><br /><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgSuLlYRfKPUdw7ZjNS0ey9Jj_t45H1KxLnmlDqpEkB8BE8qJcqMQ10vyOYgSXdWJIi5GF4PpY0jnJESCNEzEr4JL-etxghhy-mtNvawpgD0SvsRxcVcmaOTAniyGyV0n3FpDB-l8CF8G8/s1600-h/SineWaves.png"><img id="BLOGGER_PHOTO_ID_5270632019781042034" style="DISPLAY: block; MARGIN: 0px auto 10px; WIDTH: 400px; CURSOR: hand; HEIGHT: 217px; TEXT-ALIGN: center" alt="" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgSuLlYRfKPUdw7ZjNS0ey9Jj_t45H1KxLnmlDqpEkB8BE8qJcqMQ10vyOYgSXdWJIi5GF4PpY0jnJESCNEzEr4JL-etxghhy-mtNvawpgD0SvsRxcVcmaOTAniyGyV0n3FpDB-l8CF8G8/s400/SineWaves.png" border="0" /></a><br /><div></div>har!shttp://www.blogger.com/profile/06728551650806056859noreply@blogger.com1tag:blogger.com,1999:blog-6000162925423321241.post-24705216576600780312008-11-13T04:46:00.000-08:002008-11-13T05:38:04.034-08:00DIECAL - It's DIESEL Enhanced with a Mathematical Engine<span style="font-family:arial;">In the last post I mentioned that I could come up with some better posts after the vacation, with the help of a refreshed mind. Hope this post justifies my words.</span><br /><span style="font-family:arial;"></span><br /><span style="font-family:arial;">The absence of a strong mathematical engine inside DIESEL has troubled most of us in the past. We are going to overcome this limitation by mixing up DIESEL with the command line calculater. It should work in AutoCAD LT as command line calculator has been included in LT2009.If you compare, DIECAL capabilities are far better than DIESEL. Using DIECAL, you can do vector calculations, access various numeric functions which are not available in DIESEL and can do so many other things. If you are not convinced, here is a sample macro to draw a sphere by placing points across the surface of a sphere.</span><br /><span style="font-family:arial;"></span><br /><span style="font-family:arial;color:#cc0000;">*^C^Csetvar;userr1;$M=$(+,$(getvar,userr1),$(getvar,userr4));$(if,$(>=,$(getvar,userr1),360),setvar;userr2;$<br />(+,$(getvar,userr2),$(getvar,userr5));setvar;userr1;0;)_Point;'CAL;[$(getvar,userr3)<br /><$(+,$(getvar,userr1),$(getvar,userr4))<$(getvar,userr2)];$(if,$(>,$(getvar,userr2),270),^c)</span><br /><span style="font-family:Georgia;"></span><br /><span style="font-family:arial;">This macro uses USERR1 to USERR5 system variables to store values. The USERR1 and USERR2 system variable values are handled by the above macro. The USERR3 system variable stores the radius of the sphere, USERR4 holds the angle between the horizontal points and USERR5 holds the angle between vertical points. These values can be set/reset using the following macro. When you run this macro, just follow the instructions shown in the status bar.</span><br /><span style="font-family:arial;"></span><br /><span style="font-family:arial;color:#cc0000;">^C^C_setvar;userr1;0;;userr2;90;_modemacro;Enter sphere radius:;userr3;\_modemacro;Enter angle between horizontal points:;userr4;\_modemacro;Enter angle between vertical points:;userr5;\_modemacro;.;</span><br /><span style="font-family:arial;"></span><br /><span style="font-family:arial;">Please remember to run this macro to set/reset values before using the main macro.The first macro makes use of the Spherical Coordinate System point format entry to place points across the surface of the sphere.Please note that the CAL command has to be invoked transparently ('CAL) in the macro in order to output the result of calculation to the active command. It's my lack of knowledge in mathematics that prevents me from showing off a powerful application to exihibit the true potential of DIECAL. Those who know trigonometry and vector algebra will really enjoy this method. Following are some sample spheres made using different radius and angle values.</span><br /><br /><br /><p align="center"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhPrnVVMnHN9XGZNrZEOSI0wKWmbbyIPvYepMurhJlxnna6JvcdLyaMJhmQ5j9GvCMwWccVEafl7E3exYKSkbrAsfp40Rs6L8EYPjPxK6dPdH2do6DTLJVqPBjnctOR19dhoS4QMVs8zRk/s1600-h/PointSphere3D.png"><img id="BLOGGER_PHOTO_ID_5268123253118743058" style="DISPLAY: block; MARGIN: 0px auto 10px; WIDTH: 400px; CURSOR: hand; HEIGHT: 320px; TEXT-ALIGN: center" alt="" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhPrnVVMnHN9XGZNrZEOSI0wKWmbbyIPvYepMurhJlxnna6JvcdLyaMJhmQ5j9GvCMwWccVEafl7E3exYKSkbrAsfp40Rs6L8EYPjPxK6dPdH2do6DTLJVqPBjnctOR19dhoS4QMVs8zRk/s400/PointSphere3D.png" border="0" /></a><strong><u> <span style="font-family:arial;">Point Sphere - 3D View</span></u></strong></p><p><br /></p><div align="center"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjAe8O7j620gTLl3DXkBPVAAW06eFxMIJEBqM6hEdcwddDWh-LToqktrsRaXqwx46WuYRgo9nYSPRccIEXlUXPcIomvyRmwObE5LmMwlzo9MS3L-6OhwoOO4jjCmVqAK5gt84xEUkjtwoE/s1600-h/PointSphere2D.png"><img id="BLOGGER_PHOTO_ID_5268123245580718578" style="DISPLAY: block; MARGIN: 0px auto 10px; WIDTH: 400px; CURSOR: hand; HEIGHT: 320px; TEXT-ALIGN: center" alt="" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjAe8O7j620gTLl3DXkBPVAAW06eFxMIJEBqM6hEdcwddDWh-LToqktrsRaXqwx46WuYRgo9nYSPRccIEXlUXPcIomvyRmwObE5LmMwlzo9MS3L-6OhwoOO4jjCmVqAK5gt84xEUkjtwoE/s400/PointSphere2D.png" border="0" /></a><br /><strong><u><span style="font-family:arial;">Point Sphere - Top View</span></u></strong><br /><div align="left"><br /></div><div align="left"><span style="font-family:arial;">Due to the presence of 3D elements, I am not quite sure whether the LT people can use the above macro. But they can surely develop a lot of advanced macros using DIECAL. To get an idea of things that can be done using DIECAL, refer to command line calculator section in AutoCAD help. Now even AutoCAD LT seems to be really unlimited. Doesn't it?</span></div><div align="left"></div></div>har!shttp://www.blogger.com/profile/06728551650806056859noreply@blogger.com0tag:blogger.com,1999:blog-6000162925423321241.post-51844552020069899122008-10-16T04:41:00.000-07:002008-10-16T05:11:51.266-07:00A Shortcut for Jumping over Words in AutoCAD<span style="font-family:arial;">This method works fine almost everywhere in windows; be it a word processor, text editor or a dialog prompt. But I thought it would be really interesting to the AutoCAD people who normally deal with a lot of text in day to day life. </span><br /><span style="font-family:arial;"></span><br /><span style="font-family:arial;">You can use <strong>CTRL + Right</strong> Arrow key to move to the next word or <strong>CTRL + Left</strong> Arrow key to move to the previous word while you are editing text inside AutoCAD. It successfully worked wherever I tried including Edit Text dialog box, Edit Attributes dialog box, MText Editor and Enhanced Attribute Editor. You can also use <strong>CTRL + Up/Down</strong> arrows to move to the beginning and end of a MText paragraph.</span><br /><span style="font-family:arial;"></span><br /><span style="font-family:arial;">Thanks to </span><a href="http://www.labnol.org/"><span style="font-family:arial;">Digital Inspiration</span></a><span style="font-family:arial;"> for the tip. By the way, I am going back home on vacation for the next three weeks and might not be spending time in front of the computers during the period. Hope to post some good stuff after the trip with the help of a 'refreshed mind' ;-)</span>har!shttp://www.blogger.com/profile/06728551650806056859noreply@blogger.com0tag:blogger.com,1999:blog-6000162925423321241.post-2355295279847763072008-10-10T22:07:00.001-07:002008-10-10T23:29:56.292-07:00Wake up Dubai / U.A.E CADers....Shaan Hurely is coming to meet you...!!<strong><a href="http://autodesk.blogs.com/about.html"><span style="font-family:arial;">Shaan Hurely</span></a></strong><span style="font-family:arial;"> is currently Platform Technology Evangelist for the AutoCAD & Platform Products as well as author of one of the most popular AutoCAD blogs, </span><a href="http://autodesk.blogs.com/between_the_lines/"><strong><span style="font-family:arial;">Between the Lines</span></strong></a><span style="font-family:arial;"> . Don't miss this oppertunity to grab his wealth of experience, knowledge and wisdom. He is available in Dubai on 26th of October. His visiting purpose in his own words;</span><br /><span style="font-family:arial;"></span><br /><span style="font-family:arial;color:#666666;"><em>"I will be presenting about AutoCAD and its future development as well as other topics in Istanbul Turkey, Kuwait, and Dubai in the next two weeks. I want to invite all AutoCAD customers in the region to the events or to possibly arrange for a private meeting at your office to discuss your use of AutoCAD and the future of AutoCAD. All events and meetings are free. This is not a sales presentation but focused on product use and technical topics. I am extremely excited to visit customers in these locations and honored to have been invited."</em></span><br /><span style="font-family:arial;"></span><br /><span style="font-family:arial;">Unfortunately I miss the oppertunity to catch him as I will be back in India for my vacation. You can see the program <strong><a href="http://autodesk.blogs.com/between_the_lines/2008/10/autocad-users-t.html">details</a></strong> in his blog. </span><br /><span style="font-family:arial;"></span><br /><span style="font-family:arial;">Welcome Aboard Shaan....!!</span>har!shttp://www.blogger.com/profile/06728551650806056859noreply@blogger.com0tag:blogger.com,1999:blog-6000162925423321241.post-60239628854170782562008-10-06T06:04:00.000-07:002008-10-07T06:17:46.334-07:00Exploring AutoCAD Field Capabilities by Developing a Simple Field Calculator<span style="font-family:arial;">We extensively use FIELD object these days for several purposes like creating a custom plot stamp or printing the filename in the title block etc. When we dig in depth, FIELD object will provide us with a lot of possibilities. Here is a simple calculator application using the 'Formula' inside the 'Object' category of field.</span><br /><span style="font-family:Arial;"></span><br /><span style="font-family:arial;">We are going to develop the calculator as an attributed block reference where you can modify the attribute values to get the result in another attribute. For this purpose, create on block with attributes FIRST_NUMBER,OPERATOR,SECOND_NUMBER and RESULT attributes and insert it into the drawing.</span><br /><span style="font-family:Arial;"></span><br /><span style="font-family:arial;">Insert the block and edit attributes in the Edit Attributes dialog. Leave the first three attributes as we are not going to do any field operations over there. Right click on the last attribute (RESULT) and select 'Insert Field' option as shown in the picture.</span><br /><span style="font-family:arial;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgo0cbsYW1djpVNYtxw2jfq7Ttm7ozSgOSKtKVrHND4BOwgz9pnPmzdnCwuwFS8Of2cnuK801MXw5VnIMObTDR0InUZs5kvw4a07uHKARAw4sYAoAmEY6sgjNnHDIV2SIpgQC4ViWOuqBQ/s400/Simp_Calc_01.png"><br /></a></span><span style="font-family:arial;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgo0cbsYW1djpVNYtxw2jfq7Ttm7ozSgOSKtKVrHND4BOwgz9pnPmzdnCwuwFS8Of2cnuK801MXw5VnIMObTDR0InUZs5kvw4a07uHKARAw4sYAoAmEY6sgjNnHDIV2SIpgQC4ViWOuqBQ/s400/Simp_Calc_01.png"><p><img id="BLOGGER_PHOTO_ID_5254030921867205618" style="DISPLAY: block; MARGIN: 0px auto 10px; CURSOR: hand; TEXT-ALIGN: center" alt="" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgo0cbsYW1djpVNYtxw2jfq7Ttm7ozSgOSKtKVrHND4BOwgz9pnPmzdnCwuwFS8Of2cnuK801MXw5VnIMObTDR0InUZs5kvw4a07uHKARAw4sYAoAmEY6sgjNnHDIV2SIpgQC4ViWOuqBQ/s400/Simp_Calc_01.png" border="0" /></a></p><p><br />You will be provided with field dialog box. Select 'Objects' field category and choose 'Formula' from the field names. Now right click on the 'Formula' text box and choose 'Insert Field' option once again (See the picture). </p></span><span style="font-family:arial;"><p><br /></p><p><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjAixM6wdhi7VI8rWLKM3__tUeycBoBX3goOlbyLDI7FTrbVH9qbYzO_j4DsTQICIIAKUbehN6aSlf-0MNebgsC69bmh5HWw6wkN19zVteUVmxik0wim9aYdJ4oBr_1PVdihwGBdM3Gpus/s1600-h/Simp_Calc_02.png"><img id="BLOGGER_PHOTO_ID_5254030950900037282" style="DISPLAY: block; MARGIN: 0px auto 10px; CURSOR: hand; TEXT-ALIGN: center" alt="" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjAixM6wdhi7VI8rWLKM3__tUeycBoBX3goOlbyLDI7FTrbVH9qbYzO_j4DsTQICIIAKUbehN6aSlf-0MNebgsC69bmh5HWw6wkN19zVteUVmxik0wim9aYdJ4oBr_1PVdihwGBdM3Gpus/s400/Simp_Calc_02.png" border="0" /></a><br />Now an additional field dialog will show up. This time select 'Object' field name from the 'Objects' category. Select the inserted block using the small button located near the 'Object type' text box. Once selected, the block properties including the attributes will be shown up in the properties list box. Select the FIRST_NUMBER attribute from the list and click 'Ok'.</p></span><span style="font-family:arial;"><p><br /></p><p><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEj3yZcyR033yrVT0Ny8HURRxcecnSgCE158Rpswe-ta-DMNjFxyyYGWSfROQlUij1S9_UCtTcAUzKWYEJoPabQCjKUiO64XBWd_igm91fw1qyedCHOUc39nXIb1NEo7ldXH4RHTjfVfc_E/s1600-h/Simp_Calc_03.png"><img id="BLOGGER_PHOTO_ID_5254030961314665250" style="DISPLAY: block; MARGIN: 0px auto 10px; CURSOR: hand; TEXT-ALIGN: center" alt="" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEj3yZcyR033yrVT0Ny8HURRxcecnSgCE158Rpswe-ta-DMNjFxyyYGWSfROQlUij1S9_UCtTcAUzKWYEJoPabQCjKUiO64XBWd_igm91fw1qyedCHOUc39nXIb1NEo7ldXH4RHTjfVfc_E/s400/Simp_Calc_03.png" border="0" /></a><br />Repeat the steps 3 and 4 to include the attributes OPERATOR and SECOND_NUMBER in the formula text box as shown in the picture. That's it. Press ok to finish the procedure.</p></span><span style="font-family:arial;"><p><br /></p><p><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjna-58oc7Onnot9O_NGXIZq9QaFrN_dHlJ3rOhC7ad4aYEd2ohxxHPg3LYOC66hW8X88ITFnLLPpICHfQXEm4W-UfPB9jDkmK0tWheiI2rDAfS3RBCfiqXYUB0QoaLWgQx6-Lbkj90aCk/s1600-h/Simp_Calc_04.png"><img id="BLOGGER_PHOTO_ID_5254030968460766466" style="DISPLAY: block; MARGIN: 0px auto 10px; CURSOR: hand; TEXT-ALIGN: center" alt="" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjna-58oc7Onnot9O_NGXIZq9QaFrN_dHlJ3rOhC7ad4aYEd2ohxxHPg3LYOC66hW8X88ITFnLLPpICHfQXEm4W-UfPB9jDkmK0tWheiI2rDAfS3RBCfiqXYUB0QoaLWgQx6-Lbkj90aCk/s400/Simp_Calc_04.png" border="0" /></a></p><p>Try changing the FIRST_NUMBER, OPERATOR and SECOND_NUMBER values. if the FIELDEVAL system variable is properly set, you will see the result soon after the next regen.</p><p></span></p><p><span style="font-family:arial;"></p><p></span></p><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhOC_ke6Bd_CiGpIe8kgtzuNi63eALb0-dZrw1Z-hnNspGRu3y_Bwj6m25cw8VRk_0w8m_WHQC_SxHqHKkL-U-VDDTawIlINLjGIPzeTFjedeH1kxaGIn3K8R5MPPRbOkhADYZI-UQJiu0/s1600-h/Simp_Calc_05.png"><span style="font-family:arial;"><img id="BLOGGER_PHOTO_ID_5254027404312418066" style="DISPLAY: block; MARGIN: 0px auto 10px; CURSOR: hand; TEXT-ALIGN: center" alt="" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhOC_ke6Bd_CiGpIe8kgtzuNi63eALb0-dZrw1Z-hnNspGRu3y_Bwj6m25cw8VRk_0w8m_WHQC_SxHqHKkL-U-VDDTawIlINLjGIPzeTFjedeH1kxaGIn3K8R5MPPRbOkhADYZI-UQJiu0/s400/Simp_Calc_05.png" border="0" /></span></a><p><span style="font-family:arial;">If you want to know how to create 'Live Fields' inside a drawing, see the <a href="http://cadingandcoding.blogspot.com/2008/08/autoclock-autocad-digital-cum-analog.html">AutoClock</a> post.<br /></span></p>har!shttp://www.blogger.com/profile/06728551650806056859noreply@blogger.com13tag:blogger.com,1999:blog-6000162925423321241.post-31194468413537683062008-09-16T03:58:00.000-07:002008-09-16T04:05:13.614-07:00Lvl2Lyr - A Utility to Translate DGN levels to AutoCAD layers using AutoCAD VBA<span style="font-family:arial;">Since Autodesk and Bentley have announced an <a href="http://www.bentley.com/en-US/Corporate/News/Quarter+3/Autodesk+Bentley+Agreement.htm">agreement</a> to expand interoperability between their applications, I thought it would be nice to have a look into the microstation API through AutoCAD VBA. I learnt a thing or two about Microstation VBA by doing the following utility. This programs imports Level structure from a DGN file to the current drawing converting it to an equivalent layer structure. For this program to work properly, you need to include reference to 'Bentley Microstation DGN 8.0 Object Library' inside VBA IDE. The utility was tested using AutoCAD 2008 and Microstation V8.</span><br /><br /><pre class="csharpcode"><br /><span class="kwrd">Sub</span> Lvl2Lyr()<br /><span class="rem">'## Translates Microstation levels to AutoCAD Layers</span><br /><span class="rem">'## Based on AutoCAD 2008 and Microstation V8.0</span><br /><span class="rem">'## Include reference to 'Bentley Microstation DGN 8.0 Object Library'</span><br /><span class="rem">'## By Mohamed Haris (zoomharis@gmail.com)</span><br /><span class="rem">'## ------------------------------------------------------------------</span><br /><span class="kwrd">On</span> <span class="kwrd">Error</span> <span class="kwrd">Resume</span> <span class="kwrd">Next</span><br /><span class="kwrd">Dim</span> oMS <span class="kwrd">As</span> <span class="kwrd">New</span> MicroStationDGN.Application<br /><span class="kwrd">Dim</span> oMSdf <span class="kwrd">As</span> DesignFile<br /><span class="kwrd">Dim</span> oMSlvls <span class="kwrd">As</span> Levels<br /><span class="kwrd">Dim</span> oMSlvl <span class="kwrd">As</span> Level<br /><span class="kwrd">Dim</span> oMSct <span class="kwrd">As</span> ColorTable<br /><span class="kwrd">Dim</span> lngMScol <span class="kwrd">As</span> <span class="kwrd">Long</span><br /><span class="kwrd">Dim</span> oCol <span class="kwrd">As</span> <span class="kwrd">New</span> AcadAcCmColor<br /><span class="kwrd">Dim</span> sLType <span class="kwrd">As</span> <span class="kwrd">String</span><br /><span class="kwrd">Dim</span> oLyr <span class="kwrd">As</span> AcadLayer<br /><span class="kwrd">Dim</span> red <span class="kwrd">As</span> <span class="kwrd">Byte</span>, green <span class="kwrd">As</span> <span class="kwrd">Byte</span>, blue <span class="kwrd">As</span> <span class="kwrd">Byte</span><br /><span class="kwrd">Dim</span> eDwgLWs <span class="kwrd">As</span> <span class="kwrd">Variant</span><br />ThisDrawing.Utility.Prompt vbCrLf & _<br /> <span class="str">"Importing layer settings from Microstation....."</span><br /><span class="rem">'## C:\Test.dgn is the sample file used</span><br /><span class="kwrd">Set</span> oMSdf = oMS.OpenDesignFile(<span class="str">"C:\Test.dgn"</span>)<br /><span class="rem">'## Get the color table from the DGN file</span><br /><span class="kwrd">Set</span> oMSct = oMSdf.ExtractColorTable<br /><span class="kwrd">Set</span> oMSlvls = oMSdf.Levels<br /><span class="rem">'## Iterate through each level to grab the properties</span><br /><span class="kwrd">For</span> <span class="kwrd">Each</span> oMSlvl <span class="kwrd">In</span> oMSlvls<br /> <span class="rem">'## Prefix MS_ with each layer name to make out the imported layers</span><br /> <span class="kwrd">Set</span> oLyr = ThisDrawing.Layers.Add(<span class="str">"MS_"</span> & oMSlvl.Name)<br /> <span class="rem">'## Remove the brackets from the linetype name before used in Acad</span><br /> sLType = Trim(Replace(Replace(oMSlvl.ElementLineStyle.Name, _<br /> <span class="str">"("</span>, <span class="str">""</span>, , , vbTextCompare), <span class="str">")"</span>, <span class="str">""</span>, , , vbTextCompare))<br /> <span class="rem">'## Hope the linetypes are available in Acad</span><br /> ThisDrawing.Linetypes.Load sLType, <span class="str">"acad.lin"</span><br /> <span class="rem">'## Set linetype for the layer</span><br /> oLyr.Linetype = sLType<br /> <span class="rem">'## Don't know a better way to convert DGN colors to DWG colors</span><br /> <span class="rem">'## Grabbed RGB from DGN and applied it in the DWG</span><br /> lngMScol = oMSct.GetColorAtIndex(oMSlvl.ElementColor)<br /> red = lngMScol <span class="kwrd">Mod</span> &H100<br /> lngMScol = lngMScol \ &H100<br /> green = lngMScol <span class="kwrd">Mod</span> &H100<br /> lngMScol = lngMScol \ &H100<br /> blue = lngMScol <span class="kwrd">Mod</span> &H100<br /> oCol.SetRGB red, green, blue<br /> <span class="rem">'## Set layer color</span><br /> oLyr.TrueColor = oCol<br /> <span class="rem">'## Is layer isolated?</span><br /> oLyr.LayerOn = oMSlvl.IsDisplayed<br /> <span class="rem">'## Is layer frozen?</span><br /> oLyr.Freeze = oMSlvl.IsFrozen<br /> <span class="rem">'## Is layer locked?</span><br /> oLyr.Lock = oMSlvl.IsLocked<br /> <span class="rem">'## Is layer Plottable?</span><br /> oLyr.Plottable = oMSlvl.Plot<br /> <span class="rem">'## Layer description</span><br /> oLyr.Description = oMSlvl.Description<br /> <span class="rem">'## Convert lineweights</span><br /> <span class="rem">'## Define a enum array with respect to DGN lineweights from 0 to 31</span><br /> eDwgLWs = Array(acLnWt000, acLnWt013, acLnWt030, acLnWt040, acLnWt053, _<br /> acLnWt070, acLnWt080, acLnWt100, acLnWt106, acLnWt120, _<br /> acLnWt140, acLnWt158, acLnWt158, acLnWt158, acLnWt200, _<br /> acLnWt211, acLnWt211, acLnWt211, acLnWt211, acLnWt211, _<br /> acLnWt211, acLnWt211, acLnWt211, acLnWt211, acLnWt211, _<br /> acLnWt211, acLnWt211, acLnWt211, acLnWt211, acLnWt211, _<br /> acLnWt211, acLnWt211)<br /> oLyr.Lineweight = eDwgLWs(oMSlvl.ElementLineWeight)<br /><span class="kwrd">Next</span><br /><span class="rem">'## Close the DGN file</span><br />oMSdf.Close<br /><span class="rem">'## Quit Microstation application</span><br />oMS.Quit<br />ThisDrawing.Utility.Prompt vbCrLf & <span class="str">"Layer settings were imported from Microstation."</span> & vbCrLf<br /><span class="kwrd">Set</span> oCol = <span class="kwrd">Nothing</span><br /><span class="kwrd">Set</span> oLyr = <span class="kwrd">Nothing</span><br /><span class="kwrd">Set</span> oMSlvl = <span class="kwrd">Nothing</span><br /><span class="kwrd">Set</span> oMSlvls = <span class="kwrd">Nothing</span><br /><span class="kwrd">Set</span> oMSct = <span class="kwrd">Nothing</span><br /><span class="kwrd">Set</span> oMSdf = <span class="kwrd">Nothing</span><br /><span class="kwrd">Set</span> oMS = <span class="kwrd">Nothing</span><br /><span class="kwrd">End</span> Sub</pre>har!shttp://www.blogger.com/profile/06728551650806056859noreply@blogger.com0tag:blogger.com,1999:blog-6000162925423321241.post-9594490046323388222008-09-09T03:43:00.000-07:002008-09-09T04:05:30.993-07:00Advanced Drag & Drop Operations - Link to a Specific Excel Cell or Range<p><span style="font-family:arial;">Have you ever tried linking an AutoCAD object to a specific cell or row? For example, you might want to link a door block with a specific row inside the door schedule. Follow the easy steps to accomplish the task.</span></p><ul><li><span style="font-family:arial;">Keep the Excel file and the drawing open.<br /><br /></li></span><li><span style="font-family:arial;">Select the required cell by clicking on it.<br /><br /></li></span><li><span style="font-family:arial;">Move the cursor towards the side of the cell until you see the move symbol (Similar to what you see inside the lens in zoom extents button icon).<br /><br /></li></span><li><span style="font-family:arial;">Now right click and drag the cell to the AutoCAD window.<br /><br /></li></span><li><span style="font-family:arial;">On releasing the right mouse button, you will be provided with a menu containing a menu item 'Create hyperlink here' as shown below. </span></li></ul><span style="font-family:Arial;"><p><br /></p></span><span style="font-family:arial;"><ul></span><span style="font-family:arial;"></span><li><span style="font-family:arial;">Select the AutoCAD entity to be linked when prompted for object selection.<br /><br /></li></span><li><span style="font-family:arial;">Close the excel file and click on the AutoCAD entity holding down the Ctrl key to check the link.</span><br /></li></ul><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgyVFSbDAmosPp_vImWVwmHaZCobVtVhFrUKgXsfhDDXssl0kRHNGA7GdOLi6kqLAn1DX6ON2gaCfyvmLek2lEJFAgcSd74ZHfcIzMjI2mLlMDZsVKiPJUV8zKZbENkatsgcAyaZzUmTQA/s1600-h/Drag_Drop_doc_xl.png"><img id="BLOGGER_PHOTO_ID_5243970754472904130" style="DISPLAY: block; MARGIN: 0px auto 10px; CURSOR: hand; TEXT-ALIGN: center" alt="" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgyVFSbDAmosPp_vImWVwmHaZCobVtVhFrUKgXsfhDDXssl0kRHNGA7GdOLi6kqLAn1DX6ON2gaCfyvmLek2lEJFAgcSd74ZHfcIzMjI2mLlMDZsVKiPJUV8zKZbENkatsgcAyaZzUmTQA/s400/Drag_Drop_doc_xl.png" border="0" /></a><span style="font-family:arial;">You can modify the above link to select a range of cells instead of a single cell.Press Ctrl+K and select the previous AutoCAD entity to open 'Edit Hyperlink' dialog box. At the end of the link, you will see something like <em>file name.xls#sheet name!cell number</em>. For example, suppose you are linking the C3 cell of Sheet1 of Test.xls placed in C: drive, then the link path will be C:\Test.xls#Sheet1!C3. In order to link a range of cells, you have to modify the above syntax to <em>file name.xls#sheet name!cell number1:cell number2</em>. ie, in the above example, it will become C:\Test.xls#Sheet1!C3:E6 to link a range of C3:E6.<br /><br />Try to link a word paragraph using the above method and let me know how you achieved the desired result.<br /></span>har!shttp://www.blogger.com/profile/06728551650806056859noreply@blogger.com0tag:blogger.com,1999:blog-6000162925423321241.post-48059053398720749582008-09-09T03:35:00.000-07:002008-09-09T03:42:34.201-07:00Advanced Drag & Drop Operations - Load / Run Scripts / LISP / VBA / ARX<span style="font-family:arial;">Depending upon the type of files, there may be slight variations in the drag & drop result. Let's see how each file type responds.</span><br /><span style="font-family:Arial;"></span><br /><span style="font-family:arial;"><strong>Script</strong>: If you drag and drop a script file into the autocad window, it executes the script.<br /><br /><strong>LISP</strong>: If you drag and drop a file containing LISP expressions but not a function definition, it straight away executes the LISP expressions. If the file consists of any LISP function definitions, it loads the functions into AutoCAD.<br /><br /><strong>VBA</strong>: If you drag and drop a DVB file, it loads that project. The VBA module files (BAS extension) doesn't support drag and drop loading.<br /><br /><strong>ARX</strong>: Loads the specific ARX application.<br /><br />You can also use the drag and drop method to load other customization files like CUI, MNS etc.</span>har!shttp://www.blogger.com/profile/06728551650806056859noreply@blogger.com0