<?xml version="1.0" encoding="utf-8"?>
<!-- generator="FeedCreator 1.7.2" -->
<rss version="2.0">
    <channel>
        <title>Nate Holt</title>
        <description>&lt;p&gt;&lt;em&gt;&lt;span&gt;Danielle Wood is the Director of Editorial for Education.com.&amp;nbsp;You can reach her at &lt;a href=&quot;mailto:editorial@education.com&quot;&gt;editorial@education.com&lt;/a&gt;&lt;/span&gt;&lt;/em&gt;&lt;/p&gt;</description>
        <link>http://mfgcommunity.autodesk.com/blogs/blog/7/Nate_Holt/</link>
        <lastBuildDate>Sun, 22 Nov 2009 13:54:30 -0700</lastBuildDate>
        <generator>FeedCreator 1.7.2</generator>
        <language>en</language>
        <item>
            <title>AutoCAD Electrical Etcetera</title>
            <link>http://mfgcommunity.autodesk.com/blogs/blog/view/7/AutoCAD_Electrical_Etcetera_1/</link>
            <description><![CDATA[<p>Controlling the Machine is no longer being updated. Don't worry, though, you  can&nbsp;still follow&nbsp;Nate Holt&nbsp;at his new blog, AutoCAD Electrical Etcetera. You'll  find it at <a href="http://nateholt.wordpress.com/">http://nateholt.wordpress.com</a>.&nbsp;Or you  subscribe to&nbsp;his feed to get his latest words of wisdom automatically: <a href="http://nateholt.wordpress.com/feed/">http://nateholt.wordpress.com/feed/</a>.  You also can continue to view the Controlling Machine archives for Nate's  AutoCAD Electrical tips and tricks.</p>]]></description>
            <pubDate>Wed, 26 Aug 2009 23:09:00 -0700</pubDate>
            <guid>http://mfgcommunity.autodesk.com/blogs/blog/view/7/AutoCAD_Electrical_Etcetera_1/</guid>
        </item>
        <item>
            <title>Nate's Blog is Moving</title>
            <link>http://mfgcommunity.autodesk.com/blogs/blog/view/7/Nates_Blog_Moving_1/</link>
            <description><![CDATA[<p>Follow Nate&rsquo;s AutoCAD Electrical blog as it prepares to move over into the &ldquo;Peer&rdquo; blogs section. Follow this the new link:  http://nateholt.wordpress.com (RSS feed at http://nateholt.wordpress.com/feed ).  The blog name is changing to &quot;AutoCAD Electrical Etcetera&quot;. See you there! - Nate.<br /><br />
<br /><br />
<strong>Update: </strong><strike>6 7 8 10 12   14  15</strike> 17 new postings at this new blog site - most recent dealing with Circuit Builder!</p><br />
<p>&nbsp;</p>]]></description>
            <pubDate>Sun, 12 Jul 2009 17:21:00 -0700</pubDate>
            <guid>http://mfgcommunity.autodesk.com/blogs/blog/view/7/Nates_Blog_Moving_1/</guid>
        </item>
        <item>
            <title>Attribute writes to non-opened drawings</title>
            <link>http://mfgcommunity.autodesk.com/blogs/blog/view/7/attr_write_nonactive/</link>
            <description><![CDATA[<p>This dovetails with the last posting... instead of Xdata writes, this one illustrates attribute writes... find/replace block insert attribute values on non-opened drawings.</p><br />
<p>There is at least one other posting from a couple years ago ( ! )&nbsp;that deals with this subject, but here we'll pull it together a bit more completely. We'll illustrate two little AutoLisp utilities... one that works on the active drawing only and employs straight, generic AutoLisp calls. The second will be a version that is meant to work on non-opened drawing files. It seems to test okay using AutoCAD Electrical 2008 through 2010. I did not test on other ACE versions, so exercise caution.</p><br />
<p><strong>The Scenario</strong></p><br />
<p>The example will be this... we want to post-process our electrical schematic drawings and look for block insert instances with attribute tag &quot;COLOR&quot;. We examine the current value on the attribute. If it matches up with a short list of possible values, we map a new value to it and push this out to the attribute.</p><br />
<p>For example, if we find attribute &quot;COLOR&quot; with a value of &quot;R&quot; (for &quot;red&quot;), we want to map a new value of &quot;RD&quot; and push it out to the block insert's COLOR attribute. If we find a value of &quot;G&quot; (for &quot;green&quot;), we want to map a new value of &quot;GN&quot; and push it out.</p><br />
<p><strong>The Straight AutoLISP version - active drawing only</strong></p><br />
<p>Here is the first version of the utility (below). It is designed to process the active drawing only. You APPLOAD the utility, launch it at the &quot;Command:&quot; prompt. It runs, makes the changes, and exits.</p><br />
<p>(defun c:remap_color_attrval ( / ss en ix str target_attrnam maplst slen <br /><br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; ben blknam enn edd oldval newval newedd hitattr hdl ed x)<br /><br />
&nbsp; ; Process all block inserts on active drawing. Look for attribute<br /><br />
&nbsp; ; named &quot;COLOR&quot;. If found, check existing value and map new color<br /><br />
&nbsp; ; value to it. Also adjust the attribute's text size a bit to<br /><br />
&nbsp; ; accommodate the longer mapped attribute value (ex: change &quot;R&quot; to &quot;RD&quot;<br /><br />
&nbsp; ; or change &quot;B&quot; to &quot;BU&quot;)<br /><br />
&nbsp; ;<br /><br />
&nbsp; ; -- list mapping here --<br /><br />
&nbsp; (setq target_attrnam &quot;COLOR&quot;)<br /><br />
&nbsp; (setq maplst (list<br /><br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; (list &quot;R&quot; &quot;RD&quot;) ; red<br /><br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; (list &quot;B&quot; &quot;BL&quot;) ; blue<br /><br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; (list &quot;A&quot; &quot;AM&quot;) ; amber<br /><br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; (list &quot;G&quot; &quot;GN&quot;) ; green<br /><br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; (list &quot;C&quot; &quot;CL&quot;) ; clear<br /><br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; (list &quot;W&quot; &quot;WT&quot;) ; white<br /><br />
&nbsp; ) )<br /><br />
&nbsp; ; -- main program starts here --<br /><br />
&nbsp; (setq ss (ssget &quot;_X&quot; '((0 . &quot;INSERT&quot;))))<br /><br />
&nbsp; (if (/= ss nil)<br /><br />
&nbsp;&nbsp;&nbsp; (progn<br /><br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; (setq slen (sslength ss)) ; number of entities in selection set<br /><br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; (setq ix 0) ; use to index through the selection set list<br /><br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; (while (&lt; ix slen)<br /><br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; (setq ben (ssname ss ix)) ; get next block insert instance<br /><br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; ; from the selection set<br /><br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; (setq ix (1+ ix)) ; increment index for next time<br /><br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; ; Now look for target attribute tag. Can do this in either<br /><br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; ; of two way... can use a call to look for the attribute on<br /><br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; ; this block insert, or can do it the hard way and cycle<br /><br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; ; through all stand-alone subentities of this block insert<br /><br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; ; instance and look for the target attribute. Let's do it<br /><br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; ; the hard way.<br /><br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <br /><br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; ; Now cycle through its stand-alone subentities like attributes<br /><br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; ; (this is not the same as cycling through the entities of the <br /><br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; ; block definition itself)<br /><br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; (setq hitattr nil)<br /><br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; (if (setq enn (entnext ben)) (setq edd (entget enn)))<br /><br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; (while (AND enn (not hitattr) <br /><br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; (/= (cdr (assoc 0 edd)) &quot;SEQEND&quot;) ; end of this entity<br /><br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; (/= (cdr (assoc 0 edd)) &quot;INSERT&quot;) ) ; beginning of next!<br /><br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; (if (= (cdr (assoc 2 edd)) target_attrnam)<br /><br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; (progn ; yes, found target attribute tag<br /><br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; (setq oldval (cdr (assoc 1 edd)))<br /><br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; (setq hitattr 1) ; remember that we've found target attribute<br /><br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; ; so we can exit out of the &quot;while&quot; loop<br /><br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; ; sooner rather than later.<br /><br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; ; Look for this target value in the map list<br /><br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; (setq newval nil) ; use as flag to remember if mapped value hit<br /><br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; (foreach x maplst<br /><br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; (if (= (car x) oldval)<br /><br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; (progn ; match on old attribute value<br /><br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; (setq newval (cadr x)) ; get the new mapped value<br /><br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; ) ) )<br /><br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; (if newval<br /><br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; (progn ; yes, found a new mapped value for this attribute<br /><br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; ; Prepare to push new value back out to the attribute<br /><br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; (if (setq newedd (subst (cons 1 newval)(assoc 1 edd) edd))<br /><br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; (progn <br /><br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; (entmod newedd) ; push new attribute value out<br /><br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; ; Display something to the command window<br /><br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; (setq ed (entget ben)) ; open the block insert instance<br /><br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; ; Get block name<br /><br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; (setq blknam (cdr (assoc 2 ed)))<br /><br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; ; Get handle<br /><br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; (setq hdl (cdr (assoc 5 ed)))<br /><br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; ; Display to command window<br /><br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; (princ &quot;\nHDL=&quot;)(princ hdl)<br /><br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; (princ &quot; BLKNAM=&quot;)(princ blknam)<br /><br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; (princ &quot;, &quot;)(princ target_attrnam)<br /><br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; (princ &quot; old=&quot;)(princ oldval)<br /><br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; (princ &quot;, new=&quot;)(princ newval)&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <br /><br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; ) ) <br /><br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; ) )<br /><br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; ) )<br /><br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; (if (setq enn (entnext enn)) ; advance to next sub-entity of this<br /><br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; (setq edd (entget enn)))&nbsp;&nbsp; ; block insert instance<br /><br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; )&nbsp;&nbsp;&nbsp;&nbsp; <br /><br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; )&nbsp; <br /><br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; (setq ss nil) ; release the selection set<br /><br />
&nbsp; ) )<br /><br />
&nbsp; (princ)<br /><br />
)&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</p><br />
<p>The above can be&nbsp;downloaded here:</p><br />
<p><a href="/files/29401_29500/29471/file_29471.lsp">files/29401_29500/29471/file_29471.lsp</a>&nbsp;- rename to remap_color_value.lsp. Appload it. Type <strong>remap_color_attrval</strong>&nbsp;[Enter] at the &quot;Command:&quot; prompt.<br /><br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</p><br />
<p><strong>The second version - meant to operate on non-opened drawing files</strong></p><br />
<p>This version parallels the one above but uses calls that are specific to AutoCAD Electrical (tested in ACE2008-2010 only). It is a bit longer and not reproduced here. Download a copy at this link:</p><br />
<p><a href="/files/29401_29500/29481/file_29481.lsp">files/29401_29500/29481/file_29481.lsp</a>&nbsp;- rename to remap_color_value_notactive.lsp. Appload it. Type <strong>remap_color_attrval_projectwide</strong> [Enter] at the &quot;Command:&quot; prompt.</p><br />
<p>The advantage of this second version is that the processing can be done on multiple drawings without having to open each in turn.</p><br />
<p>&nbsp;</p>]]></description>
            <pubDate>Mon, 06 Jul 2009 01:57:00 -0700</pubDate>
            <guid>http://mfgcommunity.autodesk.com/blogs/blog/view/7/attr_write_nonactive/</guid>
        </item>
        <item>
            <title>Pushing Xdata out to non-opened AutoCAD Electrical drawings</title>
            <link>http://mfgcommunity.autodesk.com/blogs/blog/view/7/xdata_writes_to_non_open_dwgs/</link>
            <description><![CDATA[<p>A user's custom application needed a little performance boost. Opening and closing multiple drawings to gather data was just too time consuming.</p><br />
<p>In this posting, the rarely-used &quot;USER&quot; table in the active project's database file will illustrate&nbsp;results of pushing certain&nbsp;extended entity data (i.e. &quot;Xdata&quot;) out to non-opened project drawings. This data then&nbsp;automatically flows into the USER table and is immediately available (with a very short time delay) for project-wide queries and tasks.</p><br />
<p><strong>What is the project scratch database's&nbsp;USER table?</strong></p><br />
<p>Extended entity data (Xdata) assigned to wire numbers, schematic components and terminals, and panel footprints and panel terminals is automatically pulled into this table IF the Xdata appname is in this format:</p><br />
<blockquote style="margin-right: 0px" dir="ltr"><br />
<p><em><strong>VIA_WD_USERnnn</strong></em></p><br />
</blockquote><br />
<p>... where <em><strong>nnn</strong></em> = 000 through 199. The data pulled into the table is limited to 255 character values. This means that a single wire number or component inserted into any drawing of the project can have up to 200 of these VIA_WD_USERnnn Xdata values, each with 255 characters, and have all of this data automatically maintained in the project scratch database USER table.</p><br />
<p>What data should be pushed into these Xdata value assignments? That's up to you!</p><br />
<p>Example... let's say that you want to remember&nbsp;connecting wire lug&nbsp;/ ferrule&nbsp;assignments for&nbsp;certain component&nbsp;terminal pin connections. Here are the three motor starter contacts related to motor starter coil M414. Let's say that we want to mark each of these three child symbols with some wire connection &quot;lug&quot; assignment.</p><br />
<p>&nbsp;<img class="" alt="" width="496" height="305" src="/files/29101_29200/29161/file_29161.png" /></p><br />
<p>Each component symbol (i.e. block insert) on this drawing carries an AutoCAD &quot;handle&quot; assignment (automatically assigned by the AutoCAD drawing editor as the block insert instance is popped into the schematic). For example, the bottom child contact's handle assignment is &quot;2A0&quot;. Remember this. It will be used to link things up a bit later.</p><br />
<p><strong>The&nbsp;Example Xdata Assignment / Editor utility</strong></p><br />
<p>Launching&nbsp;the attached utility pops up this opening dialog. This lists all drawings in the current, active project. You pick which drawing and what component category to process. Here we'll select the DEMO02 drawing and &quot;Schematic components&quot;.</p><br />
<p><img class="" alt="" width="504" height="423" src="/files/29101_29200/29111/file_29111.png" /></p><br />
<p>The utility queries the COMP table in the active project's scratch database file and finds all schematic components that are on the selected DEMO02 drawing (via query on field DWGIX). This dialog immediately displays:</p><br />
<p><img class="" alt="" width="508" height="623" src="/files/29101_29200/29151/file_29151.png" />&nbsp;</p><br />
<p>Now we pick on the three child instances of M414 and add some proposed Xdata values. Let's say that the first Xdata value will be for the component's first &quot;01&quot; wire connection and the second for the &quot;02&quot; wire connection.</p><br />
<p>&nbsp;</p><br />
<p><img alt="" width="362" height="302" src="/files/29101_29200/29101/file_29101.png" /></p><br />
<p>&nbsp;After making the proposed assignments for the three child contacts, the dialog displays above. The Xdata has not yet been written out to the&nbsp;un-opened DEMO02.dwg drawing file. It is written as soon as select the &quot;Save changes&quot; button.</p><br />
<p>At this point, the utility runs through this part of its program:</p><br />
<p>(if (not cancel3)<br /><br />
&nbsp; (progn ; save this block of data to target drawing<br /><br />
&nbsp;&nbsp;&nbsp; (setq changed nil)<br /><br />
&nbsp;&nbsp;&nbsp; (princ &quot;\nWriting Xdata changes back to drawing...&quot;)<br /><br />
&nbsp;&nbsp;&nbsp; ; Open the drawing file<br /><br />
&nbsp;&nbsp;&nbsp; <strong>(setq filehdl (wd_dbx_open picked_dwgnam &quot;w&quot;))<br /><br />
</strong>&nbsp;&nbsp;&nbsp; (foreach rec comp_plus_user_data_lst<br /><br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; ; rec = (list compdata user_lst_for_this_comp oldvals newvals)<br /><br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; ; The 3rd and 4th elements only present if the xdata was<br /><br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; ; edited for the given component.<br /><br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; (if (= (length rec) 4)<br /><br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; (progn<br /><br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; (setq compdata (nth 0 rec)) ; DWGIX,INST,LOC,HDL,TAGNAME<br /><br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; (setq hdl (substr (nth 3 compdata) 3)) ; strip off the &quot;h=&quot; prefix<br /><br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; (setq user_lst_for_this_comp (nth 1 rec))<br /><br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; (setq oldvals (nth 2 rec)) ; values 000 through 009<br /><br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; (setq newvals (nth 3 rec))<br /><br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; ; Compare old and new values for each of the USERxxx <br /><br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; ; entries. On a change, go ahead and push the new<br /><br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; ; value out to the target component (via its handle)<br /><br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; (setq ix 0)<br /><br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; (foreach new newvals<br /><br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; (if (not old)<br /><br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; (setq old nil)<br /><br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; ; ELSE<br /><br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; (setq old (nth ix oldvals))<br /><br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; )&nbsp; <br /><br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; (if (AND new (/= new old))<br /><br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; (progn ; different, push it out<br /><br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; (setq str (itoa ix))<br /><br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; (cond<br /><br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; ((&lt; ix 10)(setq str (strcat &quot;USER00&quot; str)))<br /><br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; ((&lt; ix 100)(setq str (strcat &quot;USER0&quot; str)))<br /><br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; )<br /><br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; ; Push this xdata value out to the target component (via its<br /><br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; ; &quot;hdl&quot; handle) on the opened dwg file (file handle &quot;filehdl&quot;).<br /><br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; ; Xdata tag name is &quot;VIA_WD_USER&lt;suffix&gt;&quot;<br /><br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<strong> (wd_1b_mod_1000_xdata filehdl hdl (strcat &quot;VIA_WD_&quot; str) new T)<br /><br />
</strong>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; (setq changed T)<br /><br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; (princ &quot;\n&quot;)(princ (nth 4 compdata))(princ &quot; (&quot;)<br /><br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; (princ hdl)(princ &quot;) &quot;)<br /><br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; (princ (strcat &quot;VIA_WD_&quot; str))<br /><br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; (princ &quot;=&quot;)<br /><br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; (princ new)<br /><br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; ) )<br /><br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; (setq ix (1+ ix))&nbsp;&nbsp;&nbsp; <br /><br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; )<br /><br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; ) )&nbsp;&nbsp;&nbsp; <br /><br />
&nbsp;&nbsp;&nbsp; )<br /><br />
&nbsp;&nbsp;&nbsp; (if changed<br /><br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; (progn ; close the drawing and save changes<br /><br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; (princ &quot;\n&quot;)<br /><br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <strong>(wd_dbx_close filehdl T)<br /><br />
</strong>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; )<br /><br />
&nbsp;&nbsp;&nbsp; ; ELSE<br /><br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; (progn ; no xdata written to this drawing file.<br /><br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; ; Close with &quot;no save&quot; <br /><br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; (wd_dbx_close filehdl nil)<br /><br />
&nbsp;&nbsp;&nbsp; ) )<br /><br />
&nbsp;&nbsp;&nbsp; (setq filehdl nil)&nbsp; <br /><br />
&nbsp; )</p><br />
<p>The highlighted lines are key. These enable the Xdata values to be written out to the target components on the un-opened AutoCAD drawing file. This seems to work fine on ACE2008 through ACE2010. Did not try other versions.</p><br />
<p>In a few moments, AutoCAD Electrical's normal auto-freshen of the project scratch database will sense that drawing DEMO02.dwg time/date stamp has changed and&nbsp;its data needs to be &quot;freshened&quot;. Suddenly these Xdata assignments show up in the USER table ( ! )</p><br />
<p><img class="" alt="" width="561" height="575" src="/files/29101_29200/29121/file_29121.png" /></p><br />
<p>&nbsp;</p><br />
<p>The link between the component's records in the USER table and the component's records in the COMP table can be established via match-ups with the DWGIX and HDL field values.</p><br />
<p><strong>Note:</strong> There is potential for confusion. The &quot;nnn&quot; part of the VIA_WD_USERnnn xdata name is zero-based but when it is extracted into the USER table, the &quot;SUFFIX&quot; value is one-based. This means that USER000 will map to suffix 001 in the USER table, USER001 to 002, ... USER199 maps to 200.</p><br />
<p><strong>Conclusion</strong></p><br />
<p>So, there it is. You can&nbsp;push custom data to components on filed drawings and then have that data automatically show up on the project's scratch database file.</p><br />
<p><strong>Download sample utility here</strong></p><br />
<p><a href="/files/29101_29200/29171/file_29171.dcl">files/29101_29200/29171/file_29171.dcl</a>&nbsp;- rename USER_TABLE_DEMO.DCL and put it into any AutoCAD Electrical support folder</p><br />
<p><a href="/files/29101_29200/29181/file_29181.lsp">files/29101_29200/29181/file_29181.lsp</a>&nbsp;- rename USER_TABLE_DEMO.LSP</p><br />
<p>To run:&nbsp; APPLOAD the lsp file. Then type USER_TABLE_DEMO [Enter] at the &quot;Command:&quot; prompt.</p><br />
<p>This sample utility seems to work in either SDI or MDI mode.</p>]]></description>
            <pubDate>Mon, 22 Jun 2009 03:21:00 -0700</pubDate>
            <guid>http://mfgcommunity.autodesk.com/blogs/blog/view/7/xdata_writes_to_non_open_dwgs/</guid>
        </item>
        <item>
            <title>AutoCAD Electrical's report customization - the 'User Post'</title>
            <link>http://mfgcommunity.autodesk.com/blogs/blog/view/7/User_Post_Detailed/</link>
            <description><![CDATA[<p>We've posted a number of times with specific examples of report 'User Posts'. Here is another but one that is given in much greater detail. This posting might better serve as template for creating your own customizations&nbsp;of AutoCAD Electrical's reports.</p><br />
<p><strong>The Challenge</strong></p><br />
<p>&nbsp;A European dealer had a customer who wanted his Cable From/To report to repeat the parent cable marker's catalog assignment for each and every child entry in the report.</p><br />
<p>For example, here is how a portion of the default report displays.</p><br />
<p><img class="" alt="" width="549" height="459" src="/files/28601_28700/28651/file_28651.png" /></p><br />
<p>The problem for this user is that he wants to see the cable's catalog assignment show up for EVERY core/conductor displayed, not just the first 'parent' entry for the cable.</p><br />
<p>In the highlighted section above for cable tag-ID '-W5', the parent core/conductor carries the MFG/CAT catalog assignment (parent = 1 in the CBLP1C2 column).&nbsp;This shows up for the one line in the report for cable -W5.&nbsp;But the remaining child core/conductors (child = 2 in CBLP1C2 column)&nbsp;do not carry the parent's assignment and therefore their entries in the report show blank for the catalog assignment.</p><br />
<p>The customer wants all these filled in.</p><br />
<p>One work-around is to put the same catalog assignment on each child core/conductor of the cable. This will solve one problem (our Cable From/To report) but will then totally confuse the Bill of Materials report... we'll get a full cable BOM entry for every conductor/core found in a cable.</p><br />
<p>So, the only reasonable work-around is to create a &quot;user post&quot;.</p><br />
<p><strong>The Default User Post for the Cable From/To Report</strong></p><br />
<p>There is a default user post AutoLISP utility for each AutoCAD Electrical report type. There is one for this Cable From/To report.</p><br />
<p>So, when the normal Cable From/To report displays,&nbsp; the user selects the &quot;User Post&quot; button on the lower right-hand corner of the report dialog.</p><br />
<p><img class="" alt="" width="280" height="185" src="/files/28601_28700/28661/file_28661.png" /></p><br />
<p>This launches an AutoLISP utility &quot;cablecon.lsp&quot; and passes the block of report data (in form of &quot;list of lists&quot;) to this cablecon.lsp utility. The location of this&nbsp;user post&nbsp;program file is displayed in the command window (shown below for ACE2008, subsequent releases have it in &quot;c:\documents and settings\All Users\Documents\Autodesk\Acade 200x\Support\&quot;). This user post&nbsp;utility immediately fires up and&nbsp;displays an options dialog as shown here.</p><br />
<p><img class="" alt="" width="622" height="333" src="/files/28601_28700/28671/file_28671.png" /></p><br />
<p>&nbsp;Our challenge is to add a fourth option to this dialog:<em><strong> &quot;Display catalog assignments on child entries&quot;</strong></em></p><br />
<p><strong>&nbsp;Step 1 - Modify the dialog &quot;DCL&quot; file</strong></p><br />
<p>Open the file cablecon.dcl with any ASCII text editor. This file should be in the same folder as the user post utility (path shown in command window above).</p><br />
<p>Make a back-up copy. Then carefully modify the original version. Add the fourth option as shown below and save the modified file.</p><br />
<p><img class="" alt="" width="605" height="551" src="/files/28601_28700/28681/file_28681.png" /></p><br />
<p>That should now trigger a fourth toggle to display when the Cable From/To User Post is run. But this new toggle is not &quot;hooked up&quot; to anything. That's the next [more complicated] step.</p><br />
<p><strong>Step 2 - Modify the cablecon.lsp file</strong></p><br />
<p>Open up this file (path given above) with an ASCII text editor or with the Visual Lisp editor built into AutoCAD / AutoCAD Electrical. Page down a bit to the &quot;main routine&quot; section shown below. Add in the two lines of code as marked. These two lines make the initial link into the new toggle added to the dialog definition file in Step #1.</p><br />
<p><img class="" alt="" width="558" height="386" src="/files/28601_28700/28691/file_28691.png" />&nbsp;</p><br />
<p>Now the meat of the addition...!</p><br />
<p>Page down to near the bottom of the cablecon.lsp file. Insert the new section as shown here:</p><br />
<p><img class="" alt="" width="613" height="730" src="/files/28701_28800/28701/file_28701.png" /></p><br />
<p><strong>Here is how the above is meant to work...</strong></p><br />
<p>When the user selects the 4th toggle on the opening DCL dialog, it sets the &quot;user_4&quot; flag to a value of &quot;1&quot;. This triggers this highlighted section of the utility to execute. The first &quot;foreach...&quot; makes an initial pass through each line of passed report data (in list &quot;wd_rdata&quot;). Here is how this first pass works, but a bit of explanation needed first.</p><br />
<p>The format of the report data is a list of sublists. Each sublist represents&nbsp;the data for a line in the&nbsp;report. Each line's sublist has about 70 or so elements. What each element means is given in a comment section shown at the top of the user post cablecon.lsp file and is reproduced below.</p><br />
<p>; -- Structure of the &quot;wd_rdata&quot; list of lists passed from ACE:<br /><br />
;<br /><br />
; (list (list &lt;report line1 data&gt;) (list &lt;report line2 data&gt;) ... )<br /><br />
; where each line data sublist consists of a list of the following:<br /><br />
; 0 = wire number<br /><br />
; 1 = LOC for &quot;from&quot; device<br /><br />
; 2 = TAG ID for &quot;from&quot; device<br /><br />
; 3 = terminal PIN number for &quot;from&quot; device connection<br /><br />
; 4 = LOC for &quot;to&quot; device<br /><br />
; 5 = TAG ID for &quot;to&quot; device<br /><br />
; 6 = terminal PIN number for &quot;to&quot; device connection<br /><br />
; 7 = WIRELAY for wire touching &quot;from&quot; device<br /><br />
; 8 = WIRELAY for wire touching &quot;to&quot; device<br /><br />
; 9 = line ref of &quot;from&quot; device<br /><br />
; 10= line ref of &quot;to&quot; device<br /><br />
; 11= SHEET number for &quot;from&quot; device<br /><br />
; 12= SHEET number for &quot;to&quot; device<br /><br />
; 13= cable marker - TAG ID (if cable marker present in wire)<br /><br />
; 14= cable marker - conductor color/number value<br /><br />
; 15= cable marker - LOC code<br /><br />
; 16= cable marker - MFG part number assignment<br /><br />
; 17= cable marker - CAT part number assignment<br /><br />
; 18= cable marker - ASSYCODE part number assignment<br /><br />
; 19= cable marker - catalog lookup DESC field value<br /><br />
; 20= cable marker - catalog lookup QUERY1 field value<br /><br />
; 21= cable marker - catalog lookup QUERY2 field value<br /><br />
; 22= cable marker - catalog lookup MISC1 field value<br /><br />
; 23= cable marker - catalog lookup MISC2 field value<br /><br />
; 24= cable marker - catalog lookup USER1 field value<br /><br />
; 25= cable marker - catalog lookup USER2 field value<br /><br />
; 26= cable marker - catalog lookup USER3 field value<br /><br />
; 27= cable marker - DESC1 description value assignment<br /><br />
; 28= cable marker - DESC2<br /><br />
; 29= cable marker - DESC3<br /><br />
; 30= cable marker - 1=parent marker, 2=child marker<br /><br />
; 31= TAG:PIN - combined &quot;from&quot; device text consisting of TAG ID and PIN number<br /><br />
; 32= TAG:PIN - combined &quot;to&quot; device text consisting of TAG ID and PIN number<br /><br />
; 33= SEC assignment for drawing with &quot;from&quot; device<br /><br />
; 34= SUBSEC assignment for drawing with &quot;from&quot; device<br /><br />
; 35= SEC assignment for drawing with &quot;to&quot; device<br /><br />
; 36= SUBSEC assignment for drawing with &quot;to&quot; device<br /><br />
; 37= INST assignment of &quot;from&quot; device<br /><br />
; 38= INST assignment of &quot;to&quot; device<br /><br />
; 39= IEC style name for &quot;from&quot; device<br /><br />
; 40= IEC style name for &quot;to&quot; device<br /><br />
; 41= TERMDESC value of &quot;from&quot; device wire connection point<br /><br />
; 42= TERMDESC value of &quot;to&quot; device wire connection point<br /><br />
; 43= wire connection sequence code for &quot;from&quot; device wire connection<br /><br />
; 44= wire connection sequence code for &quot;to&quot; device wire connection<br /><br />
; 45= PNLWDLEV1<br /><br />
; 46= PNLWDLEV2<br /><br />
; 47= CMPHDL1 = handle of the &quot;from&quot; component<br /><br />
; 48= CMPHDL2 = handle of the &quot;to&quot; component<br /><br />
; 49= DWGIX1 = the &quot;from&quot; component's drawing index number<br /><br />
; 50= DWGIX2 = the &quot;to&quot; component's drawing index number<br /><br />
; 51= DWGNAM1 = the %D drawing name value of the &quot;from&quot; drawing<br /><br />
; 52= DWGNAM2 = the %D drawing name value of the &quot;to&quot; drawing<br /><br />
; 53= handle of the cable marker<br /><br />
; 54= INST of the cable marker<br /><br />
; 55= CBLDWGIX drawing index number of the cable marker<br /><br />
; 56= entity name of the connected wire on &quot;from&quot; component<br /><br />
; 57= entity name of the connected wire on &quot;to&quot; component<br /><br />
; 58= wire connection direction of &quot;from&quot; component wire connection<br /><br />
; 59= wire connection direction of &quot;to&quot; component wire connection<br /><br />
; 60-62 = X,Y,Z of any associated &quot;from&quot; panel layout wire connection<br /><br />
; 63= &quot;from&quot; panel footprint representation wire connection direction<br /><br />
; 64-66 = X,Y,Z of any associated &quot;to&quot; panel layout wire connection<br /><br />
; 67= &quot;to&quot; panel footprint representation wire connection direction<br /><br />
; 68 = estimated wire length based upon 60-62 and 64-66</p><br />
<p>So, our first pass needs to&nbsp;look for parent entries (index 30 in&nbsp;the sublist)&nbsp;that have non blank catalog assignments (index 17 in the sublist). For each one found in the first pass, it saves that line of data in a variable called &quot;parent_lst&quot;.</p><br />
<p><img class="" alt="" width="414" height="163" src="/files/28701_28800/28711/file_28711.png" /></p><br />
<p>Now, with all parent cable markers found, the utility makes a second pass through the lines of report data. It looks for &quot;child&quot; cable marker entries (value of &quot;2&quot; in the 30th index position) and makes sure that the child entry has no current assignment (the index 17 position is blank).</p><br />
<p>For each hit, it quickly looks for a parent match (from the &quot;parent_lst&quot; list collected in the first pass). If match on tag-ID and INST and LOC, then it pulls a copy of the parent's MFG/CAT/ASSYCODE &nbsp;and pushes it into the child's sublist (index positions 16,17, and 18).</p><br />
<p><img class="" alt="" width="532" height="365" src="/files/28701_28800/28721/file_28721.png" /></p><br />
<p>The second pass builds a new, fresh copy of the list of sublists for the report (built in the variable called &quot;rtrn&quot;). The parent entries and children that have no parent match get pushed back into this new version of the data &quot;as is&quot;. But the child entries that find a match get their modified version pushed into &quot;rtrn&quot;. The version last line shown above replaces the original &quot;wd_rdata&quot; list of data with this modified version.</p><br />
<p>This new version of the report data is returned back to the report display dialog. That's about it. The dialog will now display the child entries with the MFG/CAT values filled in ( ! )</p><br />
<p>&nbsp;<img class="" alt="" width="547" height="270" src="/files/28701_28800/28731/file_28731.png" /></p>]]></description>
            <pubDate>Mon, 15 Jun 2009 12:53:00 -0700</pubDate>
            <guid>http://mfgcommunity.autodesk.com/blogs/blog/view/7/User_Post_Detailed/</guid>
        </item>
        <item>
            <title>Mass update - attribute re-namer tool - AutoCAD Electrical</title>
            <link>http://mfgcommunity.autodesk.com/blogs/blog/view/7/attr_rename_list/</link>
            <description><![CDATA[<p>This came up recently. It's not a perfect solution but seemed to make the user happy. He had a number of old schematic designs made with generic blocks with attributes. He wanted some AutoCAD Electrical compatibility for simple things like BOM reporting.</p><br />
<p>The key is to rename the attributes to be those that AutoCAD Electrical expects to find. Here is a utility that seems to work. It process all block inserts on the active drawing. For each block it scans the block for all its attributes. It compares each attribute to a list of &quot;old&quot; names. On a match it gets the corresponding new name and renames the attribute on-the-fly.</p><br />
<p>Seems to work!</p><br />
<p>This AutoLISP program is reproduced here. The old versus new attribute name list is in the top part of the program. Edit this file and replace the old/new attributes appropriately. Save the file, APPLOAD it, and run it!</p><br />
<p>; 20-May-09 NEHolt created<br /><br />
(defun c:attr_rename_list (&nbsp; / x_en enn edd ss slen ix atnam <br /><br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; namelist hit blk_ent<br /><br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; matchname newed x) <br /><br />
&nbsp; ; Process all block instances on active drawing. Check each <br /><br />
&nbsp; ; attribute for match on first element in list below. On any<br /><br />
&nbsp; ; match, rename the attribute to the new name given in the<br /><br />
&nbsp; ; second element. <br /><br />
&nbsp; <br /><br />
&nbsp; ; ***********&nbsp;&nbsp; ATTRIBUTE OLD versus NEW names list&nbsp;&nbsp; ******************<br /><br />
&nbsp; (setq namelist (list<br /><br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; ; list old name and new name. Old name can contain wild cards.<br /><br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; (list &quot;ID&quot; &quot;TAG1&quot;)&nbsp; ; list old name and new name. <br /><br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; (list &quot;TEXT-1&quot; &quot;DESC1&quot;)<br /><br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; (list &quot;TEXT-2&quot; &quot;DESC2&quot;)<br /><br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; (list &quot;TERMINAL1&quot; &quot;TERM01&quot;)<br /><br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; (list &quot;TERMINAL2&quot; &quot;TERM02&quot;)<br /><br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; (list &quot;PARTNUM&quot; &quot;CAT&quot;)<br /><br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; (list &quot;VENDOR&quot; &quot;MFG&quot;)<br /><br />
&nbsp; ) )&nbsp; <br /><br />
&nbsp; ; **********************************************************************<br /><br />
&nbsp; <br /><br />
&nbsp; ; Extract selection set of all block inserts on active drawing&nbsp; <br /><br />
&nbsp; (setq ss (ssget &quot;_X&quot; '((0 . &quot;INSERT&quot;))))<br /><br />
&nbsp; (if (/= ss nil)<br /><br />
&nbsp;&nbsp;&nbsp; (progn<br /><br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; (setq slen (sslength ss))<br /><br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; (setq ix 0)<br /><br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; (while (&lt; ix slen)<br /><br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; (setq blk_ent (ssname ss ix)) ; get next block insert to process&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <br /><br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; (setq ix (1+ ix)) ; increment for next time<br /><br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; (setq enn (entnext blk_ent)) <br /><br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; (setq edd (entget enn))&nbsp; <br /><br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; (while (AND enn (/= (cdr (assoc 0 edd)) &quot;SEQEND&quot;) <br /><br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; (/= (cdr (assoc 0 edd)) &quot;INSERT&quot;) )<br /><br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; (if (= (cdr (assoc 0 edd)) &quot;ATTRIB&quot;)<br /><br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; (progn<br /><br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; (setq atnam (cdr (assoc 2 edd)))<br /><br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; (setq hit nil)<br /><br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; (foreach x namelist<br /><br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; (if (not hit)<br /><br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; (progn ; no match yet, keep processing<br /><br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; (setq matchname (car x))&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <br /><br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; (if (wcmatch atnam matchname) <br /><br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; (progn ; found exact match or wild-card match<br /><br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; ; Change name now. Substitute in new name.<br /><br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; (setq newed (subst (cons 2 (cadr x)) (assoc 2 edd) edd)) <br /><br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; (entmod newed) ; update the title block instance<br /><br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; (entupd blk_ent) <br /><br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; (princ &quot;\n&quot;)<br /><br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; (princ atnam)<br /><br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; (princ &quot; --&gt; &quot;)<br /><br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; (princ (cadr x))<br /><br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; (setq hit 1) ; flag that found<br /><br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; ) ) ) )<br /><br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; )<br /><br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; )<br /><br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; )&nbsp;&nbsp;&nbsp;&nbsp; <br /><br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; ; go to next sub ent in block instance and loop back up<br /><br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; (if (setq enn (entnext enn)) (setq edd (entget enn))) <br /><br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; ) ) <br /><br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; (setq ss nil) ; release the selection set<br /><br />
&nbsp;&nbsp;&nbsp; )<br /><br />
&nbsp; )<br /><br />
&nbsp; (princ) ; prettier<br /><br />
)</p><br />
<p>Download a copy of the utility here:&nbsp;<a href="/files/27801_27900/27811/file_27811.lsp">files/27801_27900/27811/file_27811.lsp</a></p><br />
<p>Rename it to something like attr_rename_list.lsp. Then to run it, APPLOAD this file and type attr_rename_list [Enter] at the AutoCAD command prompt.</p>]]></description>
            <pubDate>Thu, 21 May 2009 03:32:35 -0700</pubDate>
            <guid>http://mfgcommunity.autodesk.com/blogs/blog/view/7/attr_rename_list/</guid>
        </item>
        <item>
            <title>Index to 100+ AutoCAD Electrical Utilities</title>
            <link>http://mfgcommunity.autodesk.com/blogs/blog/view/7/Index_100_AutoCAD_Electrical_1/</link>
            <description><![CDATA[<p>This&nbsp;blog's&nbsp;three years went quickly. It's been fun. I really appreciate the privilege to (try to) respond to your questions and suggestions. <br /><br />
<br /><br />
About a six months ago I posted a simple index to the&nbsp;86 or so utilities that had been published on this blog in its first year. Now, we're up to about 108, so here's an updated list (starting with most recent).</p><br />
<p><a href="http://mfgcommunity.autodesk.com/blogs/blog/view/7/IEC-style_Wire_Numbering_AutoCAD/">IEC-style Wire Numbering</a><br /><br />
<a href="http://mfgcommunity.autodesk.com/blogs/blog/view/7/ACE_CUI3/">Quick customize Right-Click context menu - move Delete component to bottom</a><br /><br />
<a href="http://mfgcommunity.autodesk.com/blogs/blog/view/7/Panel_Cross_ref/">Panel footprint cross-reference annotation from schematic parent</a><br /><br />
<a href="http://mfgcommunity.autodesk.com/blogs/blog/view/7/resize_attrib/">Generic title block update tool</a><br /><br />
<a href="http://mfgcommunity.autodesk.com/blogs/blog/view/7/_11/">Importing Wire Types from a master schematic</a><br /><br />
<a href="http://mfgcommunity.autodesk.com/blogs/blog/view/7/Adjusting_the_Jag_split-lines_3/">Adjusting the 'Jag' in split-lines of PLC I/O modules</a><br /><br />
<a href="http://mfgcommunity.autodesk.com/blogs/blog/view/7/form_c_swap/">Flipping Form-C contact pin assignments</a><br /><br />
<a href="http://mfgcommunity.autodesk.com/blogs/blog/view/7/Reorient_Wire_ColorGa_Labels/">Reorient Wire Color/Gauge labels</a><br /><br />
<a href="http://mfgcommunity.autodesk.com/blogs/blog/view/7/wxref_placement/">Pre-positioning cross-reference annotation</a><br /><br />
<a href="http://mfgcommunity.autodesk.com/blogs/blog/view/7/Flagging_sourcedestination/">Flagging source/destination wiretype mismatches</a><br /><br />
<a href="http://mfgcommunity.autodesk.com/blogs/blog/view/7/sysvar_lister/">Quick, Project-wide SYSVAR report - using dbx calls</a><br /><br />
<a href="http://mfgcommunity.autodesk.com/blogs/blog/view/7/Parametric_PLC_Database_1/">Parametric PLC database Find/Replace</a><br /><br />
<a href="http://mfgcommunity.autodesk.com/blogs/blog/view/7/diesel_fields_title_block/">Auto title block update using 'Diesel' fields</a><br /><br />
<a href="http://mfgcommunity.autodesk.com/blogs/blog/view/7/Proj_Specific_Catalog_File/">Auto-create Project-specific catalog lookup database file</a><br /><br />
<a href="http://mfgcommunity.autodesk.com/blogs/blog/view/7/Enhancing_Circuit_Builder_with_2/">Enhancing Circuit Builder with User-defined functions</a><br /><br />
<a href="http://mfgcommunity.autodesk.com/blogs/blog/view/7/Customizing_Project_Manager/">Customizing the Project Manager window</a><br /><br />
<a href="http://mfgcommunity.autodesk.com/blogs/blog/view/7/Processing_Multiple_Sub-Projects/">Processing multiple sub-projects (Super-project work-around)</a><br /><br />
<a href="http://mfgcommunity.autodesk.com/blogs/blog/view/7/Boosting_AutoLISP_Performance_2/">Boosting AutoLISP performance</a><br /><br />
<a href="http://mfgcommunity.autodesk.com/blogs/blog/view/7/Reformat_Wire_FromTo_report_into/">Tallied Wire Count report</a><br /><br />
<a href="http://mfgcommunity.autodesk.com/blogs/blog/view/7/Nate_simple_autolisp_004/">Wire layer lister tool</a><br /><br />
<a href="http://mfgcommunity.autodesk.com/blogs/blog/view/7/Parametric_Connectors_AutoCAD/">Parametric Connectors in AutoCAD Electrical</a><br /><br />
<a href="http://mfgcommunity.autodesk.com/blogs/blog/view/7/from_to_user_post_comp_desc/">User-post to import component descriptions into Wire From/To reports</a><br /><br />
<a href="http://mfgcommunity.autodesk.com/blogs/blog/view/7/Pushing_Wiretype_settings_signal/">Pushing Wiretype user settings to signal arrow attributes</a><br /><br />
<a href="http://mfgcommunity.autodesk.com/blogs/blog/view/7/X-Y_Grid_Wirenums_per_pickpoint/">X-Y Grid-based Wire Numbering - based on pick points</a><br /><br />
<a href="http://mfgcommunity.autodesk.com/blogs/blog/view/7/do_not_show_me_this_again/">Undoing 'Do not show me this again'</a><br /><br />
<a href="http://mfgcommunity.autodesk.com/blogs/blog/view/7/Push_Pull_Lay_1/">Circuit Generation by Layer Combos On/Off</a><br /><br />
<a href="http://mfgcommunity.autodesk.com/blogs/blog/view/7/Concatenations_Title_Block/">Concatenations in Title Block update</a><br /><br />
<a href="http://mfgcommunity.autodesk.com/blogs/blog/view/7/_4/">Match Wire Number text to Wire Color</a><br /><br />
<a href="http://mfgcommunity.autodesk.com/blogs/blog/view/7/by_tag_BOM_sort/">User-post to alter sort of 'By Tag' BOM report</a><br /><br />
<a href="http://mfgcommunity.autodesk.com/blogs/blog/view/7/Extra_Wire_Number_Display/">Extra wire number display - on component connections</a><br /><br />
<a href="http://mfgcommunity.autodesk.com/blogs/blog/view/7/ace_tse_restart/">TIP: Terminal Strip Editor - speed-up</a><br /><br />
<a href="http://mfgcommunity.autodesk.com/blogs/blog/view/7/Voltage_Drop/">Voltage drop calculations</a><br /><br />
<a href="http://mfgcommunity.autodesk.com/blogs/blog/view/7/Backwards_tagging_from_child_2/">Backwards tagging from child to parent</a><br /><br />
<a href="http://mfgcommunity.autodesk.com/blogs/blog/view/7/Missing_icon_menu_images/">Troubleshooting missing icon menu images</a><br /><br />
<a href="http://mfgcommunity.autodesk.com/blogs/blog/view/7/motwire_AU07/">Calculate motor FLA and Starter Size - AU2007</a> <br /><br />
<a href="http://mfgcommunity.autodesk.com/blogs/blog/view/7/block_lister/">Block list to a spreadsheet</a><br /><br />
<a href="http://mfgcommunity.autodesk.com/blogs/blog/view/7/lay_list_lsp/">Simple drawing parser using AutoLISP - layer list to a spreadsheet</a><br /><br />
<a href="http://mfgcommunity.autodesk.com/blogs/blog/view/7/Wire_gaps_fan_inout/">Unconventional use of Wire Gaps</a><br /><br />
<a href="http://mfgcommunity.autodesk.com/blogs/blog/view/7/dwglst_sheet_gaps/">Auto-adjust Drawing Index report</a><br /><br />
<a href="http://mfgcommunity.autodesk.com/blogs/blog/view/7/dwglst_user_post/">Drawing List report and 'user post' example</a><br /><br />
<a href="http://mfgcommunity.autodesk.com/blogs/blog/view/7/simple_conduit_calc/">Conduit fill calculation / reports</a><br /><br />
<a href="http://mfgcommunity.autodesk.com/blogs/blog/view/7/Quick_Switch_Color_Scheme_3/">Color assignment per layer - switch utility</a><br /><br />
<a href="http://mfgcommunity.autodesk.com/blogs/blog/view/7/Control_pin_text_size_graphical/">Control of pin text size in graphical cross-reference</a><br /><br />
<a href="http://mfgcommunity.autodesk.com/blogs/blog/view/7/Presetting_your_Surfer_%22Zoom%22//">Presetting your Surfer 'Zoom' factor</a><br /><br />
<a href="http://mfgcommunity.autodesk.com/blogs/blog/view/7/Constructing_AutoCAD_Electrical/">Constructing an AutoCAD Electrical project 'ZIP' utility</a><br /><br />
<a href="http://mfgcommunity.autodesk.com/blogs/blog/view/7/Updating_drawing_set_parameters/">Updating drawing set parameters from the Project's scratch database</a><br /><br />
<a href="http://mfgcommunity.autodesk.com/blogs/blog/view/7/SS-PLC_utility_adding_auto_title/">SS-&gt;PLC I/O utility - adding auto title block update</a><br /><br />
<a href="http://mfgcommunity.autodesk.com/blogs/blog/view/7/European-style_TerminalCable/">European-style Terminal/Cable connection charts</a><br /><br />
<a href="http://mfgcommunity.autodesk.com/blogs/blog/view/7/Matching_cable_tag-IDs_connected/">Matching cable tag-IDs to connected components</a><br /><br />
<a href="http://mfgcommunity.autodesk.com/blogs/blog/view/7/Auto_wire_number_tag_removal/">Auto wire number tag removal on cabled wire networks</a><br /><br />
<a href="http://mfgcommunity.autodesk.com/blogs/blog/view/7/Flipping_attribute_justification/">Flipping attribute justification on a mass scale</a><br /><br />
<a href="http://mfgcommunity.autodesk.com/blogs/blog/view/7/Customizing_the_Drawing_Index/">Customizing the Drawing Index Sheet</a><br /><br />
<a href="http://mfgcommunity.autodesk.com/blogs/blog/view/7/Vectoring_existing_projects/">Vectoring existing projects to reference ACE 2008 libraries</a><br /><br />
<a href="http://mfgcommunity.autodesk.com/blogs/blog/view/7/Flipping_In-line_wire_number/">Flipping to In-line wire number tags</a><br /><br />
<a href="http://mfgcommunity.autodesk.com/blogs/blog/view/7/Switching_Between_Standards/">Wire angle connections to dots - simple swap utility</a><br /><br />
<a href="http://mfgcommunity.autodesk.com/blogs/blog/view/7/Titleblock_Update_Previous_Next/">Titleblock Update - Previous/Next Sheet Numbers</a><br /><br />
<a href="http://mfgcommunity.autodesk.com/blogs/blog/view/7/Tracing_Polyline-connected/">Tracing Polyline-connected Components</a><br /><br />
<a href="http://mfgcommunity.autodesk.com/blogs/blog/view/7/Recovering_Corrupted_Wiring/">Recovering Corrupted Wiring in AutoCAD Electrical </a><br /><br />
<a href="http://mfgcommunity.autodesk.com/blogs/blog/view/7/Making_the_Part_Number_fit_the/">Making the Part Number fit the Relay Contacts used - AutoCAD Electrical</a><br /><br />
<a href="http://mfgcommunity.autodesk.com/blogs/blog/view/7/Smart_Title_Block_Swapping_with/">Smart Title Block Swapping with AutoCAD Electrical </a><br /><br />
<a href="http://mfgcommunity.autodesk.com/blogs/blog/view/7/Component_tagging_%22Pick_Order%22/">Component tagging by &quot;Pick Order&quot; in AutoCAD Electrical </a><br /><br />
<a href="http://mfgcommunity.autodesk.com/blogs/blog/view/7/Terminal_Plan_report_controlling/">Terminal Plan report - controlling the &quot;field&quot; wiring side in AutoCAD Electrical</a><br /><br />
<a href="http://mfgcommunity.autodesk.com/blogs/blog/view/7/Auto-mapping_%22Power%22_and/">Auto-mapping &quot;Power&quot; and &quot;Control&quot; contact pin assignments in AutoCAD Electrical </a><br /><br />
<a href="http://mfgcommunity.autodesk.com/blogs/blog/view/7/Updating_AutoCAD_Electrical_%22Web/">Updating AutoCAD Electrical &quot;Web links&quot; - Pat Murnen's neat solution </a><br /><br />
<a href="http://mfgcommunity.autodesk.com/blogs/blog/view/7/Enhancing_AutoCAD_Electricals/">Enhancing AutoCAD Electrical's Tabular Terminal Strip Layout </a><br /><br />
<a href="http://mfgcommunity.autodesk.com/blogs/blog/view/7/Bypassing_AutoCAD_Electricals/">Bypassing AutoCAD Electrical's Automatic Wire tag-ID assignments </a><br /><br />
<a href="http://mfgcommunity.autodesk.com/blogs/blog/view/7/1-line_Diagrams_and_linked_MCC/">1-line Diagrams and linked MCC layouts: AutoCAD Electrical</a><br /><br />
<a href="http://mfgcommunity.autodesk.com/blogs/blog/view/7/Creating_Special_Wire_FromTo/">Creating Special Wire From/To Annotation - AutoCAD Electrical </a><br /><br />
<a href="http://mfgcommunity.autodesk.com/blogs/blog/view/7/Repeating_In-line_Wire_Number/">Repeating In-line Wire Number Tags with Auto-update</a><br /><br />
<a href="http://mfgcommunity.autodesk.com/blogs/blog/view/7/Discrete_Cross-referencing_Large/">Discrete Cross-referencing on Large Schematic Symbols </a><br /><br />
<a href="http://mfgcommunity.autodesk.com/blogs/blog/view/7/Writing_Block_Attributes/">Writing to Block Attributes in un-opened Drawings - Example App </a><br /><br />
<a href="http://mfgcommunity.autodesk.com/blogs/blog/view/7/AutoCAD_Electricals_Modify/">AutoCAD Electrical's Modify Symbol Lib util - Pushing it beyond its limits </a><br /><br />
<a href="http://mfgcommunity.autodesk.com/blogs/blog/view/7/Linking_AutoCAD_Custom_Drawing/">Linking AutoCAD Custom Drawing Props back to AcadE Proj Mgr </a><br /><br />
<a href="http://mfgcommunity.autodesk.com/blogs/blog/view/7/When_one_Tag-ID_isnt_enough/">When one Tag-ID isn't enough </a><br /><br />
<a href="http://mfgcommunity.autodesk.com/blogs/blog/view/7/Comparing_project_defaults_all/">Comparing project defaults to all drawings at once </a><br /><br />
<a href="http://mfgcommunity.autodesk.com/blogs/blog/view/7/Incrementing_Line_References/">Incrementing Line References - customizing the &quot;user&quot; symbol </a><br /><br />
<a href="http://mfgcommunity.autodesk.com/blogs/blog/view/7/How_pull_the_10_%22user%22/">How to pull the 10 &quot;user&quot; attributes on a wire number into the From/To report </a><br /><br />
<a href="http://mfgcommunity.autodesk.com/blogs/blog/view/7/Terminal_assignments_based_upon/">Terminal assignments based upon Cable core indices </a><br /><br />
<a href="http://mfgcommunity.autodesk.com/blogs/blog/view/7/Wire_FromTo_limiting_certain/">Wire From/To - limiting to certain component type </a><br /><br />
<a href="http://mfgcommunity.autodesk.com/blogs/blog/view/7/Catalog_Lookup_Browsing_Internal/">Catalog Lookup - Browsing on Internal vs. Manufacturers part numbers </a><br /><br />
<a href="http://mfgcommunity.autodesk.com/blogs/blog/view/7/Altering_the_twist_Twisted-pair/">Altering the twist in Twisted-pair symbols </a><br /><br />
<a href="http://mfgcommunity.autodesk.com/blogs/blog/view/7/How_Alias_AutoCAD_Electrical/">How to Alias AutoCAD Electrical commands using the ACAD.PGP file </a><br /><br />
<a href="http://mfgcommunity.autodesk.com/blogs/blog/view/7/Multi-wire_bus_command_gimme_4/">Multi-wire Bus Command - controlling the default count and spacing</a><br /><br />
<a href="http://mfgcommunity.autodesk.com/blogs/blog/view/7/Wildcard_Filtering_Reports/">Wildcard Filtering in Reports</a><br /><br />
<a href="http://mfgcommunity.autodesk.com/blogs/blog/view/7/BOM_Report_Component_DESC1-3/">BOM Report + Component DESC1-3 Text </a><br /><br />
<a href="http://mfgcommunity.autodesk.com/blogs/blog/view/7/Multi-Language_Electrical/">Multi-Language Electrical Component Tagging </a><br /><br />
<a href="http://mfgcommunity.autodesk.com/blogs/blog/view/7/PLC_Wire_Numbering_based_upon/">PLC I/O Wire Numbering based upon &quot;Slot&quot; + I/O Pin Number </a><br /><br />
<a href="http://mfgcommunity.autodesk.com/blogs/blog/view/7/Catalog_Lookup_table_name/">Catalog Lookup - table name confusion </a><br /><br />
<a href="http://mfgcommunity.autodesk.com/blogs/blog/view/7/Edit_Wire_Number_Tip/">Edit Wire Number Dialog - Tip: holding in new position</a><br /><br />
<a href="http://mfgcommunity.autodesk.com/blogs/blog/view/7/Sheet/">Example of mass update of SHEET assigments</a><br /><br />
<a href="http://mfgcommunity.autodesk.com/blogs/blog/view/7/Automatic_Display_Internal_Part/">Automatic Display of Internal Part Numbers on Electrical Components </a><br /><br />
<a href="http://mfgcommunity.autodesk.com/blogs/blog/view/7/Angles_Dots">Angles to Dots (IEC angled tee symbols to dot conversion)</a><br /><br />
<a href="http://mfgcommunity.autodesk.com/blogs/blog/view/7/Special_PLC_Address-based_Wire/">Special PLC Address-based Wire Numbers </a><br /><br />
<a href="http://mfgcommunity.autodesk.com/blogs/blog/view/7/couple_SS-PLC_Tricks/">A couple SS-&gt;PLC I/O Tricks - Pin number assignments</a><br /><br />
<a href="http://mfgcommunity.autodesk.com/blogs/blog/view/7/Migrating_PLC_point_descriptions/">Migrating PLC point descriptions back to overall module representation </a><br /><br />
<a href="http://mfgcommunity.autodesk.com/blogs/blog/view/7/Dual_Catalog_Lookup_Preferred/">Dual Catalog Lookup: Preferred and Everything else </a><br /><br />
<a href="http://mfgcommunity.autodesk.com/blogs/blog/view/7/Mirror_Tears/">Mirror Tears - flipping orientation of inserted components</a><br /><br />
<a href="http://mfgcommunity.autodesk.com/blogs/blog/view/7/Customized_INSERT_PLC_Module/">Customized INSERT PLC Module Command </a><br /><br />
<a href="http://mfgcommunity.autodesk.com/blogs/blog/view/7/User_Struggle_with_Reversing/">User Struggle with Reversing Starter - WDTAGALT approach </a><br /><br />
<a href="http://mfgcommunity.autodesk.com/blogs/blog/view/7/Adding_unused_coreconductors/">Adding unused core/conductors to Cable From/To report </a><br /><br />
<a href="http://mfgcommunity.autodesk.com/blogs/blog/view/7/Flipping_between_%22Shop_floor%22/">Flipping between &quot;Shop floor&quot; and &quot;Customer&quot; tags </a><br /><br />
<a href="http://mfgcommunity.autodesk.com/blogs/blog/view/7/Instant_%22Tags_used%22_listing/">Instant &quot;Tags used&quot; listing </a><br /><br />
<a href="http://mfgcommunity.autodesk.com/blogs/blog/view/7/Attribute_Edit_255_characters/">Attribute Edit &gt; 255 characters ( ? ) </a><br /><br />
<a href="http://mfgcommunity.autodesk.com/blogs/blog/view/7/Rolling_your_own_brand_Signal/">Rolling your own brand of Signal cross-reference annotation </a><br /><br />
<a href="http://mfgcommunity.autodesk.com/blogs/blog/view/7/Fear_Not/">Writing relay contact references grouped by catalog number out to Excel</a><br /><br />
<a href="http://mfgcommunity.autodesk.com/blogs/blog/view/7/ACE20062007_project_file/">ACE2006/2007 project file compatibility with ACE2004/2005 </a><br /><br />
<a href="http://mfgcommunity.autodesk.com/blogs/blog/view/7/TMI/">Hiding subsets of rarely used catalog lookup entries</a><br /><br />
<a href="http://mfgcommunity.autodesk.com/blogs/blog/view/7/Multiple_ASSYCODE_trick/">Multiple ASSYCODE trick </a><br /><br />
<a href="http://mfgcommunity.autodesk.com/blogs/blog/view/7/Trick_with_Type_0_Pin_list/">Trick with Type 0 Pin list </a></p>]]></description>
            <pubDate>Tue, 14 Apr 2009 17:36:00 -0700</pubDate>
            <guid>http://mfgcommunity.autodesk.com/blogs/blog/view/7/Index_100_AutoCAD_Electrical_1/</guid>
        </item>
        <item>
            <title>IEC-style Wire Numbering - AutoCAD Electrical</title>
            <link>http://mfgcommunity.autodesk.com/blogs/blog/view/7/IEC-style_Wire_Numbering_AutoCAD/</link>
            <description><![CDATA[<p>Though not a specific option, IEC-style wire numbering with suppression of&nbsp;INST and LOC prefix values when match drawing defaults is possible.&nbsp;The work-around is described below.&nbsp;</p><br />
<p><img class="" height="222" alt="" width="156" src="/files/26601_26700/26621/file_26621.png" />The driving force behind this request comes from <strong>Miles Nicholson</strong>, Aceri UK. His customers often must deal with dozens of repeated, cookie-cutter circuits where wire numbers are to be the same from instance to instance - though the different wire networks with a common wire number are not connected.</p><br />
<p>A good example might&nbsp;be repeated, standard circuits found&nbsp;in motor control center documentation. Each circuit is contained within its own &quot;cubical&quot; of the MCC with only a few control wire connections leaving it to go elsewhere. Here is what the customer wants to see for wire numbering:</p><br />
<p><img class="" height="416" alt="" width="618" src="/files/26601_26700/26651/file_26651.png" /></p><br />
<p><strong>The Problem</strong></p><br />
<p>Assuming that there are a dozen drawings in the project, each with a circuit&nbsp;as shown&nbsp;above (but with different motor numbers), there are going to be twelve wire number 9's in the project set, twelve wire number 11's in the drawing set, twelve motor leads labeled&nbsp;2 in the drawing set. AutoCAD Electrical is not going to want to repeat wire numbers.</p><br />
<p><strong>Miles' Solution - Step 1</strong></p><br />
<p>The first step of the solution is to set up AutoCAD Electrical to add an IEC-style &quot;INST/LOC&quot; prefix to each wire number. The INST and LOC values can be set up as drawing-wide defaults from &quot;Drawing Properties&quot; dialog. For example, the INST value might be &quot;MCC2&quot; to designate that the drawing is associated with Motor Control Center #2. The LOC assignment might be the circuit's cubical location within MCC2. For example, LOC = &quot;C4&quot; might mean&nbsp;that is it in the third vertical section&nbsp;(&quot;C&quot;) and the&nbsp;fourth&nbsp;position down from the top (i.e. &quot;4&quot;).</p><br />
<p><img class="" height="577" alt="" width="430" src="/files/26601_26700/26661/file_26661.png" /></p><br />
<p>So, for each drawing (one MCC cubical circuit per drawing), the drawing INST/LOC defaults are set up to identify the MCC &quot;installation&quot; and the cubical &quot;location&quot; within the MCC.</p><br />
<p>Now, on this same Drawing Properties dialog, Miles sets the wire numbering format to include the IEC &quot;Inst&quot; and &quot;Loc&quot; flags (%I and %L) as a prefix to the generated wire number (the %N part of the wire number tag format).</p><br />
<p><img class="" height="343" alt="" width="479" src="/files/26601_26700/26681/file_26681.png" />&nbsp;</p><br />
<p>&nbsp;Now, with all this in place for each drawing that has a cubical schematic drawing, we're ready to do project-wide wire numbering. Since each drawing's INST/LOC combo is unique and each drawing is set to sequential wire numbering starting at &quot;1&quot;, Miles ends up with common wire numbering for each circuit except for the INST/LOC prefix. Here is one of the drawings with the unique &quot;=MCC2+C4&quot; prefix on all of the assigned wire numbers.</p><br />
<p><img class="" height="417" alt="" width="554" src="/files/26601_26700/26691/file_26691.png" /></p><br />
<p><strong>Step 2 - Stripping off the LOC and/or INST prefix when match drawing defaults</strong></p><br />
<p>Final step requires a small AutoLISP function that makes a number of calls into the AutoCAD Electrical &quot;API&quot;. This little tool will process one drawing at a time. It will read the drawing's default INST and LOC assignments (what user previously entered from Drawing Properties dialog and saved on the WD_M block). Then it will process each wire number it finds. It looks for a wire number match on the INST value. If found, it strips that part off of the wire number. Then it does the same for the LOC value. If match, it strips off that too.</p><br />
<p>The net result is that any wire number that exactly matches the drawing default's INST/LOC values will end up being restored to a bare wire number. <strong><em>But any wire number that comes from some other location (i.e. will have a different INST/LOC prefix combo), will remain unchanged ( ! ).</em></strong> Pretty cool.</p><br />
<p><img class="" height="418" alt="" width="557" src="/files/26701_26800/26701/file_26701.png" /></p><br />
<p>Here is the little AutoLisp utility. <em>Note that you can modify this utility to either work on all wire numbers or on just those that are not marked &quot;fixed&quot;. Comment out the appropriate line, about 18 lines down.</em></p><br />
<p>; ** 12-Apr-09 NEHolt reworked to look for drawing-wide INST/LOC assignments<br /><br />
; ** 16-Feb-08 NEHolt fixed typo in original<br /><br />
; -------&nbsp; W N U M _ R M V _ I E C _ S U F F I X . L S P&nbsp; ------<br /><br />
(defun c:rmv ( / ss delim_char slen ix wnum_en pos wen newnum attrname)<br /><br />
&nbsp; ; PURPOSE: remove IEC wire number suffix when INST/LOC values match up<br /><br />
&nbsp; ;&nbsp;&nbsp; with drawing-wide INST/LOC assignments... leaving just bare wire number. <br /><br />
&nbsp; ;&nbsp;&nbsp; This works on both normal wire numbers and in-line wire numbers. It updates<br /><br />
&nbsp; ;&nbsp;&nbsp; any extra wire number &quot;copies&quot; as well.<br /><br />
&nbsp; ;&nbsp;&nbsp; Note: this will process and modify just &quot;normal&quot; (i.e. non-fixed) wire numbers <br /><br />
&nbsp; ;&nbsp;&nbsp;&nbsp;&nbsp; unless adjustment made immediately below.<br /><br />
&nbsp; <br /><br />
; ************&nbsp; <br /><br />
&nbsp; ;&nbsp; To process both normal and &quot;fixed&quot; wire numbers, uncomment line &quot;WIRENO*&quot; and<br /><br />
&nbsp; ;&nbsp; comment out the &quot;WIRENO&quot; line.<br /><br />
&nbsp; ;&nbsp; To process just &quot;normal&quot; wire numbers and leave &quot;Fixed&quot; untouched, uncomment<br /><br />
&nbsp; ;&nbsp; the &quot;WIRENO&quot; line below and comment out the &quot;WIRENO*&quot; line.<br /><br />
&nbsp; ;&nbsp; (uncomment just one of the two lines below - remove the line's leading &quot;;&quot; character)<br /><br />
&nbsp; <br /><br />
;&nbsp; (setq attrname &quot;WIRENO*&quot;)&nbsp; ; uncomment this line to process both normal and fixed<br /><br />
&nbsp; (setq attrname &quot;WIRENO&quot;) ; uncomment this line to process just &quot;normal&quot; (fixed untouched)<br /><br />
&nbsp; <br /><br />
; ************<br /><br />
&nbsp; <br /><br />
&nbsp; ; Search for schematic wire number instances. This includes in-line wire number<br /><br />
&nbsp; ; instances.&nbsp; <br /><br />
&nbsp; (setq ss (ssget &quot;_X&quot; '((-4 . &quot;&lt;AND&quot;)<br /><br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; ( 0 . &quot;INSERT&quot;)<br /><br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; ( 2 . &quot;WD_WN*&quot;)<br /><br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; (-4 . &quot;AND&gt;&quot;))))<br /><br />
&nbsp; (if (/= ss nil)<br /><br />
&nbsp;&nbsp;&nbsp; (progn ; active drawing carries some wire number instances. Continue.&nbsp;&nbsp;&nbsp; <br /><br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; ; Get drawing-wide INST and LOC assignments<br /><br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; (wd_cfg_read_dwg_params) ; read the WD_M block and set GBL_wd_m global<br /><br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; (setq inst (nth 52 GBL_wd_m)) ; get INST from drawing properties<br /><br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; (setq loc (nth 53 GBL_wd_m)) ; get LOC value from drawing properties<br /><br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <br /><br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; (setq slen (sslength ss))<br /><br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; (setq ix 0)<br /><br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; (while (&lt; ix slen)<br /><br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; (setq wnum_en (ssname ss ix)) ; get wire number entity<br /><br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; (setq ix (1+ ix)) ; increment for next time&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <br /><br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; ; Get wire number text (either WIRENO* or WIRENO attribute name)<br /><br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; (if (setq wnum_val (c:wd_getattrval wnum_en attrname))<br /><br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; (progn<br /><br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; (setq save_val wnum_val) ; save copy for comparison later<br /><br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; (if (AND inst (/= inst &quot;&quot;))<br /><br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; (progn ; Look for INST prefix on this wire number string&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <br /><br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; (if (= (substr wnum_val 1 (strlen inst)) inst)&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <br /><br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; (progn ; Exact match with INST value. Strip it off<br /><br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; (setq wnum_val (substr wnum_val (1+ (strlen inst))))<br /><br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; )<br /><br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; ; ELSE<br /><br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; (progn<br /><br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; (if (= (substr wnum_val 1 (1+ (strlen inst))) (strcat &quot;=&quot; inst))<br /><br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; (progn ; Exact match with &quot;=INST&quot; value. Strip it off.<br /><br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; (setq wnum_val (substr wnum_val (+ 2 (strlen inst))))<br /><br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; ) ) ) ) ) )<br /><br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; (if (AND loc (/= loc &quot;&quot;))<br /><br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; (progn ; Look for LOC prefix on this wire number string&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <br /><br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; (if (= (substr wnum_val 1 (strlen loc)) loc)&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <br /><br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; (progn ; Exact match with INST value. Strip it off<br /><br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; (setq wnum_val (substr wnum_val (1+ (strlen loc))))<br /><br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; )<br /><br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; ; ELSE<br /><br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; (progn<br /><br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; (if (= (substr wnum_val 1 (1+ (strlen loc))) (strcat &quot;+&quot; loc))<br /><br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; (progn ; Exact match with &quot;=INST&quot; value. Strip it off.<br /><br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; (setq wnum_val (substr wnum_val (+ 2 (strlen loc))))<br /><br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; ) )&nbsp;&nbsp;&nbsp; <br /><br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; ) ) ) ) <br /><br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <br /><br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; (if (/= wnum_val save_val)<br /><br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; (progn ; Something was stripped off. Push bare wire number back<br /><br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; ; out to the wire network.<br /><br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; ; Remove any leading &quot;-&quot; prefix on the wire number<br /><br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; (if (= (substr wnum_val 1 1) &quot;-&quot;)(setq wnum_val (substr wnum_val 2)))<br /><br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <br /><br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; ; Now get the entity name of the wire that passes under this<br /><br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; ; wire number instance.&nbsp;&nbsp;&nbsp;&nbsp; <br /><br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; (if (setq wen (car (c:ace_wnum_find_wire_en wnum_en GBL_wd_trp)))&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <br /><br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; (progn ; Found it. Push revised wire number back out. Update<br /><br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; ; any extra wire number &quot;copies&quot; found on the wire network.<br /><br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; (princ &quot;\n&quot;)<br /><br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; (princ save_val)<br /><br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; (princ &quot; --&gt; &quot;)<br /><br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; (princ wnum_val)&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <br /><br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; (c:wd_putwn wen wnum_val)<br /><br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; ) ) ) ) ) )<br /><br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; )<br /><br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; (setq ss nil)<br /><br />
&nbsp;&nbsp;&nbsp; )&nbsp;&nbsp;&nbsp; <br /><br />
&nbsp; )<br /><br />
&nbsp; (princ)<br /><br />
)&nbsp;</p><br />
<p>Download it here.&nbsp;<a href="/files/26701_26800/26711/file_26711.lsp">files/26701_26800/26711/file_26711.lsp</a>&nbsp;Copy it to some folder that is in your ACAD support path and rename it wnum_rmv_iec_suffix.lsp.</p><br />
<p>To make it always available, follow the instructions that Miles shows here:</p><br />
<p>Type <strong>Appload</strong> at the command prompt.<br /><br />
Under the section StartUpSuite, select <strong>Contents</strong><br /><br />
Select <strong>Add<br /><br />
</strong>Browse to the folder where you downloaded the above file.<br /><br />
Pick the file <strong>wnum_rmv_iec_suffix.lsp<br /><br />
</strong>Select <strong>Add </strong>and then <strong>Close</strong></p><br />
<p>Now, any time you need the tool to operate on the active drawing, type RMV [Enter] at the command line. You can also run this tool in a project-wide mode. To do this, create a script file with just a single line entry &quot;RMV&quot;. Then reference this script file from the &quot;Project-wide Utilities&quot; --&gt; &quot;Run Command Script&quot; edit box.</p>]]></description>
            <pubDate>Mon, 13 Apr 2009 18:48:00 -0700</pubDate>
            <guid>http://mfgcommunity.autodesk.com/blogs/blog/view/7/IEC-style_Wire_Numbering_AutoCAD/</guid>
        </item>
        <item>
            <title>Quick Customize Right-Click Menus - AutoCAD Electrical</title>
            <link>http://mfgcommunity.autodesk.com/blogs/blog/view/7/ACE_CUI3/</link>
            <description><![CDATA[<p>User emails... placement of the &quot;Delete&quot; component command is right next to &quot;Edit&quot; component on the context-sensitive right-click menu. Too often, for this user,&nbsp;the component disappears when user expecting the edit dialog to appear ( ! )</p><br />
<p><strong>Here's the User's Problem</strong></p><br />
<p>Right-clicks on a selector switch to do a quick edit. Context menu pops up. User lunges for &quot;Edit Component&quot; but gets the button right above it instead. Selector switch disappears ( ! ).</p><br />
<p>&nbsp;<img class="" height="363" alt="" width="333" src="/files/26501_26600/26511/file_26511.png" /></p><br />
<p><strong>The Quick Fix</strong></p><br />
<p>Let's isolate this context menu's&nbsp;&quot;Delete Component&quot; button a bit. Make&nbsp;it is less likely to be selected by mistake.</p><br />
<p>Launch the CUI command. Just type CUI [Enter] at the AutoCAD Electrical command line prompt. This dialog appears:</p><br />
<p><img class="" height="492" alt="" width="433" src="/files/26501_26600/26521/file_26521.png" /></p><br />
<p>Find the &quot;Electrical&quot; category and expand the &quot;Shortcut Menus&quot;. Then expand the &quot;Hot Wire menu only - Schematic components&quot; as shown here:</p><br />
<p><img class="" height="464" alt="" width="359" src="/files/26501_26600/26531/file_26531.png" /></p><br />
<p>There's our &quot;Delete Component&quot; entry, sandwiched between &quot;Copy&quot; and &quot;Edit&quot;. What can we do about this?</p><br />
<p><strong>Solution #1 - Let's put a bit of extra space above and below it in the menu.</strong></p><br />
<p>Right click on the &quot;Delete Component&quot; entry and select &quot;Insert Separator&quot;. Right click&nbsp; on the &quot;Copy Component&quot; and do the same. This will insert a line separator below and above the &quot;Delete Component&quot; entry.</p><br />
<p><img class="" height="444" alt="" width="336" src="/files/26501_26600/26541/file_26541.png" /></p><br />
<p>Now hit OK to dismiss the CUI dialog. Let's try it. Right click on the selector switch now shows the &quot;Delete Component&quot; a bit better separated from the other commands.</p><br />
<p><img class="" height="381" alt="" width="326" src="/files/26501_26600/26551/file_26551.png" /></p><br />
<p>&nbsp;We like this. But now that we know we can do stuff like this, we want even more.</p><br />
<p><strong>Solution #2 - move this command to bottom with even more isolation.</strong></p><br />
<p>Restart the CUI command. Highlight the &quot;Erase Component&quot; command entry and drag it down to near the bottom of the menu's command list. Add in double sets of &quot;Separators&quot;.</p><br />
<p><img class="" height="477" alt="" width="355" src="/files/26501_26600/26561/file_26561.png" /></p><br />
<p>Hit OK. Test again. Yes, much better!!!</p><br />
<p><img class="" height="366" alt="" width="339" src="/files/26501_26600/26571/file_26571.png" /></p><br />
<p>&nbsp;</p><br />
<p>&nbsp;</p><br />
<p>&nbsp;</p><br />
<p>&nbsp;</p>]]></description>
            <pubDate>Fri, 10 Apr 2009 17:48:23 -0700</pubDate>
            <guid>http://mfgcommunity.autodesk.com/blogs/blog/view/7/ACE_CUI3/</guid>
        </item>
        <item>
            <title>Autodesk Assistance Program</title>
            <link>http://mfgcommunity.autodesk.com/blogs/blog/view/7/Autodesk_Assistance_Program/</link>
            <description><![CDATA[<p>The Autodesk Assistance Program is being launched in North America for unemployed&nbsp;workers in&nbsp;the architecture, engineering, design and manufacturing communities to update their skills and improve their employability in a down economy.</p><br />
<p><img class="" height="328" alt="" width="533" src="/files/25901_26000/25971/file_25971.png" /></p><br />
<p>&nbsp;Autodesk Assistance Program tools and resources will be made available through an online portal where users can access:</p><br />
<p>1. Free (per terms and conditions of the end-user license agreement that accompanies the software)&nbsp; 13-month term student license of AutoCAD, Autodesk Revit Architecture, Autodesk Inventor Professional, and/or AutoCAD Civil 3D software.</p><br />
<p>2. Free Online Training - on-demand training through vBooks (internet access required)</p><br />
<p>3. Reduced-cost Classroom Training</p><br />
<p>4. Certification - discounted rates through Autodesk AUthorized Certification Centers.</p><br />
<p>Please access this link for details:&nbsp;<a href="http://www.autodesk.com/pr-assistanceprogram">www.autodesk.com/pr-assistanceprogram</a></p><br />
<p>FAQ: &nbsp;<a href="http://students8.autodesk.com/ama/orig/Autodesk_Assistance_Program_Customer_FAQ-_FINAL.pdf">students8.autodesk.com/ama/orig/Autodesk_Assistance_Program_Customer_FAQ-_FINAL.pdf</a></p>]]></description>
            <pubDate>Mon, 06 Apr 2009 15:04:00 -0700</pubDate>
            <guid>http://mfgcommunity.autodesk.com/blogs/blog/view/7/Autodesk_Assistance_Program/</guid>
        </item>
    </channel>
</rss>
