<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic WD_COPY_WN LISP COMMAND EXAMPLE in AutoCAD Electrical Forum</title>
    <link>https://forums.autodesk.com/t5/autocad-electrical-forum/wd-copy-wn-lisp-command-example/m-p/11391377#M7372</link>
    <description>&lt;P&gt;I need an example for a Lisp command using "WD_COPY_WN".&lt;/P&gt;&lt;P&gt;For drawing wires I have used&amp;nbsp;&lt;SPAN&gt;(c:WD_WIRE '(&lt;/SPAN&gt;&lt;SPAN&gt;6.56250&lt;/SPAN&gt;&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;SPAN&gt;18.81250&lt;/SPAN&gt;&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;SPAN&gt;0.&lt;/SPAN&gt;&lt;SPAN&gt;) '(&lt;/SPAN&gt;&lt;SPAN&gt;5.56250&lt;/SPAN&gt;&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;SPAN&gt;18.81250&lt;/SPAN&gt;&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;SPAN&gt;0.&lt;/SPAN&gt;&lt;SPAN&gt;)&amp;nbsp;&lt;/SPAN&gt;&lt;SPAN&gt;""&lt;/SPAN&gt;&lt;SPAN&gt;).&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;Trying to use the "WD_COPY_WN" command, I have not been able to make it work.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;I would appreciate the example to place the wire copy at an exact coordinate, as opposed to using "LAST".&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;Also, is there a different command similar to "WD_COPY_WM" for horizontal wires? This command seems to only work for vertical wires.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;One Example of a working command would be much appreciated!&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;(Reposted from AutoCAD Customization Forum)&lt;/SPAN&gt;&lt;/P&gt;</description>
    <pubDate>Tue, 30 Aug 2022 19:58:36 GMT</pubDate>
    <dc:creator>Nicholas.J.CAD</dc:creator>
    <dc:date>2022-08-30T19:58:36Z</dc:date>
    <item>
      <title>WD_COPY_WN LISP COMMAND EXAMPLE</title>
      <link>https://forums.autodesk.com/t5/autocad-electrical-forum/wd-copy-wn-lisp-command-example/m-p/11391377#M7372</link>
      <description>&lt;P&gt;I need an example for a Lisp command using "WD_COPY_WN".&lt;/P&gt;&lt;P&gt;For drawing wires I have used&amp;nbsp;&lt;SPAN&gt;(c:WD_WIRE '(&lt;/SPAN&gt;&lt;SPAN&gt;6.56250&lt;/SPAN&gt;&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;SPAN&gt;18.81250&lt;/SPAN&gt;&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;SPAN&gt;0.&lt;/SPAN&gt;&lt;SPAN&gt;) '(&lt;/SPAN&gt;&lt;SPAN&gt;5.56250&lt;/SPAN&gt;&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;SPAN&gt;18.81250&lt;/SPAN&gt;&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;SPAN&gt;0.&lt;/SPAN&gt;&lt;SPAN&gt;)&amp;nbsp;&lt;/SPAN&gt;&lt;SPAN&gt;""&lt;/SPAN&gt;&lt;SPAN&gt;).&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;Trying to use the "WD_COPY_WN" command, I have not been able to make it work.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;I would appreciate the example to place the wire copy at an exact coordinate, as opposed to using "LAST".&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;Also, is there a different command similar to "WD_COPY_WM" for horizontal wires? This command seems to only work for vertical wires.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;One Example of a working command would be much appreciated!&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;(Reposted from AutoCAD Customization Forum)&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Tue, 30 Aug 2022 19:58:36 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/autocad-electrical-forum/wd-copy-wn-lisp-command-example/m-p/11391377#M7372</guid>
      <dc:creator>Nicholas.J.CAD</dc:creator>
      <dc:date>2022-08-30T19:58:36Z</dc:date>
    </item>
    <item>
      <title>Re: WD_COPY_WN LISP COMMAND EXAMPLE</title>
      <link>https://forums.autodesk.com/t5/autocad-electrical-forum/wd-copy-wn-lisp-command-example/m-p/11391383#M7373</link>
      <description>&lt;P&gt;"WD_COPY_WN" is (WD ??) Copy Wire Number.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="NicholasJCAD_0-1661889541529.png" style="width: 600px;"&gt;&lt;img src="https://forums.autodesk.com/t5/image/serverpage/image-id/1109930iF621F2C2AACA4EB0/image-size/medium?v=v2&amp;amp;px=400" role="button" title="NicholasJCAD_0-1661889541529.png" alt="NicholasJCAD_0-1661889541529.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="NicholasJCAD_1-1661889541740.png" style="width: 600px;"&gt;&lt;img src="https://forums.autodesk.com/t5/image/serverpage/image-id/1109931i027E7D9126F88243/image-size/medium?v=v2&amp;amp;px=400" role="button" title="NicholasJCAD_1-1661889541740.png" alt="NicholasJCAD_1-1661889541740.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="NicholasJCAD_2-1661889541748.png" style="width: 600px;"&gt;&lt;img src="https://forums.autodesk.com/t5/image/serverpage/image-id/1109929iDB44CA9C730AD224/image-size/medium?v=v2&amp;amp;px=400" role="button" title="NicholasJCAD_2-1661889541748.png" alt="NicholasJCAD_2-1661889541748.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="NicholasJCAD_3-1661889541741.png" style="width: 600px;"&gt;&lt;img src="https://forums.autodesk.com/t5/image/serverpage/image-id/1109932i4EB2DD9BA4E4C4AA/image-size/medium?v=v2&amp;amp;px=400" role="button" title="NicholasJCAD_3-1661889541741.png" alt="NicholasJCAD_3-1661889541741.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I have not been able to use this in lisp command form, especially with placement at an exact coordinate.&lt;/P&gt;</description>
      <pubDate>Tue, 30 Aug 2022 19:59:10 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/autocad-electrical-forum/wd-copy-wn-lisp-command-example/m-p/11391383#M7373</guid>
      <dc:creator>Nicholas.J.CAD</dc:creator>
      <dc:date>2022-08-30T19:59:10Z</dc:date>
    </item>
    <item>
      <title>Re: WD_COPY_WN LISP COMMAND EXAMPLE</title>
      <link>https://forums.autodesk.com/t5/autocad-electrical-forum/wd-copy-wn-lisp-command-example/m-p/11391424#M7374</link>
      <description>&lt;P&gt;How about looking into the API help?&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;DIV id="areafixed" class="Element710"&gt;
&lt;DIV class="Element92"&gt;
&lt;DIV class="Element5"&gt;(c:wd_putwnxy) should do it.&lt;/DIV&gt;
&lt;DIV class="Element5"&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="20220830 221718 thlct.png" style="width: 992px;"&gt;&lt;img src="https://forums.autodesk.com/t5/image/serverpage/image-id/1109937i5C4664F70174A492/image-size/large?v=v2&amp;amp;px=999" role="button" title="20220830 221718 thlct.png" alt="20220830 221718 thlct.png" /&gt;&lt;/span&gt;&lt;/DIV&gt;
&lt;DIV class="Element5"&gt;&amp;nbsp;&lt;/DIV&gt;
&lt;/DIV&gt;
&lt;/DIV&gt;</description>
      <pubDate>Tue, 30 Aug 2022 20:17:49 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/autocad-electrical-forum/wd-copy-wn-lisp-command-example/m-p/11391424#M7374</guid>
      <dc:creator>rhesusminus</dc:creator>
      <dc:date>2022-08-30T20:17:49Z</dc:date>
    </item>
    <item>
      <title>Re: WD_COPY_WN LISP COMMAND EXAMPLE</title>
      <link>https://forums.autodesk.com/t5/autocad-electrical-forum/wd-copy-wn-lisp-command-example/m-p/11391449#M7375</link>
      <description>&lt;P&gt;Doing a quick search would show you there is nothing to be found rhesusminus.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="NicholasJCAD_1-1661891146085.png" style="width: 600px;"&gt;&lt;img src="https://forums.autodesk.com/t5/image/serverpage/image-id/1109941iC67EB3F8B951DA4A/image-size/medium?v=v2&amp;amp;px=400" role="button" title="NicholasJCAD_1-1661891146085.png" alt="NicholasJCAD_1-1661891146085.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;This menu often helps, but not today.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;After the command "WD_COPY_WN" is entered, it asks to select a wire. It does not accept a coordinate here. I am able to command "LAST" but the Wd_wch (wire copy) block is placed&amp;nbsp; in unappreciated location.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I have been reading through the "c:wd_putwn..." commands, although none of these seem to work for wires part of an existing branch with defined wire number (wire copy).&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;(Really appreciate this find as this may be handy in the future!)&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;EDIT:&amp;nbsp;&lt;/STRONG&gt;I may be able to take the existing "wd_putwnxy" command and copy it over to a new command, having it check if the wire is on a defined network, and using the found wire number value to place a wire copy block.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 30 Aug 2022 20:45:30 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/autocad-electrical-forum/wd-copy-wn-lisp-command-example/m-p/11391449#M7375</guid>
      <dc:creator>Nicholas.J.CAD</dc:creator>
      <dc:date>2022-08-30T20:45:30Z</dc:date>
    </item>
    <item>
      <title>Re: WD_COPY_WN LISP COMMAND EXAMPLE</title>
      <link>https://forums.autodesk.com/t5/autocad-electrical-forum/wd-copy-wn-lisp-command-example/m-p/11391649#M7376</link>
      <description>&lt;P&gt;While the API dont have a command to insert wire number copies, these are the tools you have to automate the process.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;If you turn on lisp debugging with the command AEONLISPDEBUG you can see the following when inserting a wire number copy:&lt;/P&gt;
&lt;LI-CODE lang="general"&gt;Command:
Extra Wire Number

&amp;lt;Select wire for Extra wire number copy&amp;gt;:
IN:wd_copy_wirenumber
  IN/OUT:wd_wnet_find_ptr_for_net=
  IN/OUT:wd_1_get_hdl_ptr_xdata VIA_WD_WNPTR=FB2FB2
  IN/OUT:wd_wnum_get_wire_num=506A
IN:wd_sym_insert_elect_block2 WD_WCH
  IN/OUT:wd_lay_adjust_attrib_layers
IN:wd_sed_is_it_schem_or_pnl
OUT:wd_sed_is_it_schem_or_pnl=12
OUT:wd_sym_insert_elect_block2 506A
IN:wd_wnum_move_wnum_if_bump
  IN/OUT:wd_wnum_get_text_box
  IN/OUT:wd_wnum_does_text_bump=nil
OUT:wd_wnum_move_wnum_if_bump
OUT:wd_copy_wirenumber
&amp;lt;Select wire for Extra wire number copy&amp;gt;:*Cancel*

IN:wd_1_cserr
  IN/OUT:wd_dbase_releaseallhandles
OUT:wd_1_cserr
Command:&lt;/LI-CODE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;So, it's analyzing the selected wire to find the "main" wire number and extract the wire number value from there. Then it inserts the WD_WCH block (wire number copy), and changes the attribute value of that block.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Unfortunately, those commands are undocumented, but sometimes you're able to reverse engineer by trial and failure.&lt;/P&gt;</description>
      <pubDate>Tue, 30 Aug 2022 22:35:27 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/autocad-electrical-forum/wd-copy-wn-lisp-command-example/m-p/11391649#M7376</guid>
      <dc:creator>rhesusminus</dc:creator>
      <dc:date>2022-08-30T22:35:27Z</dc:date>
    </item>
  </channel>
</rss>

