<?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 Re: Connecting blocks with line or arc for electrical plans in Visual LISP, AutoLISP and General Customization Forum</title>
    <link>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/connecting-blocks-with-line-or-arc-for-electrical-plans/m-p/8307223#M144142</link>
    <description>&lt;BLOCKQUOTE&gt;&lt;HR /&gt;@Anonymous&amp;nbsp;wrote:&lt;BR /&gt;
&lt;P&gt;&amp;nbsp;Can the arcs be connected into a polyline after finishing the command?&lt;/P&gt;
&lt;HR /&gt;&lt;/BLOCKQUOTE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;The drawing of the Arc could be followed by JOINing it to whatever precedes [if anything].&amp;nbsp; In either &lt;a href="https://forums.autodesk.com/t5/user/viewprofilepage/user-id/75977"&gt;@hmsilva&lt;/a&gt;'s routine in Message 12, or mine in Message 20, try&amp;nbsp;following the (command) function that draws the Arc with&amp;nbsp;this [untested]:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;FONT color="#000000"&gt;(if joined&lt;/FONT&gt;&lt;FONT color="#00ccff"&gt;; is there a cumulative Polyline already?&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;FONT color="#000000"&gt;(command "_.join" joined (entlast))&lt;/FONT&gt;&lt;FONT color="#00ccff"&gt;; then ['joined' retains entity name]&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;FONT color="#000000"&gt;(progn&lt;/FONT&gt; &lt;FONT color="#00ccff"&gt;; else -- turn Arc into start of 'joined'&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;FONT color="#000000"&gt;(setq pea (getvar 'peditaccept))&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT color="#000000"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; (setvar 'peditaccept 1)&lt;/FONT&gt;&lt;FONT color="#00ccff"&gt;; just in case&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;FONT color="#000000"&gt;(command "_.pedit" (entlast) "")&lt;/FONT&gt;&lt;FONT color="#00ccff"&gt;; turn into Polyline [new entity name]&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;FONT color="#000000"&gt;(setvar 'peditaccept pea)&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT color="#000000"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; (setq joined (entlast))&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT color="#000000"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; )&lt;/FONT&gt;&lt;FONT color="#999999"&gt;; progn&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;FONT color="#000000"&gt; )&lt;/FONT&gt;&lt;FONT color="#999999"&gt;; if&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Alternatively, the "arcs" could be drawn directly as single &lt;EM&gt;Polyline&lt;/EM&gt;&amp;nbsp; arc segments, to eliminate the need for much of the 'else' argument above.&amp;nbsp; That would require changing the command name and prompt sequence in the way the arcs are drawn, but wouldn't be difficult.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;In either case, add joined to the list of localized variables at the beginning of the command definition.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Looking back, I notice the &lt;EM&gt;link in Message 25&lt;/EM&gt; -- check that out, too.&lt;/P&gt;</description>
    <pubDate>Tue, 02 Oct 2018 13:31:10 GMT</pubDate>
    <dc:creator>Kent1Cooper</dc:creator>
    <dc:date>2018-10-02T13:31:10Z</dc:date>
    <item>
      <title>Connecting blocks with line or arc for electrical plans</title>
      <link>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/connecting-blocks-with-line-or-arc-for-electrical-plans/m-p/5494374#M144115</link>
      <description>&lt;P&gt;Hi all,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I have been searching something similar all over web but no luck.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I need lisp that would ask for point 1 (specified by user) , insert block1 (ie. light switch), than ask point 2, insert block2 (ie. pendant light), draw a line (or an arc) connecting two, ask for point3, insert block3 (ie. light switch, again), connects&amp;nbsp;it with block 2 and so on...&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Hope I was clear with idea and it is possible to make...&lt;/P&gt;&lt;P&gt;I should start working on electrical plans and since so many people before me had same problem with this i hope someone already have it.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks and hoping for some help.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Cheers&lt;/P&gt;&lt;P&gt;Jan&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 04 Feb 2015 08:52:36 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/connecting-blocks-with-line-or-arc-for-electrical-plans/m-p/5494374#M144115</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2015-02-04T08:52:36Z</dc:date>
    </item>
    <item>
      <title>Re: Connecting blocks with line or arc for electrical plans</title>
      <link>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/connecting-blocks-with-line-or-arc-for-electrical-plans/m-p/5494476#M144116</link>
      <description>&lt;P&gt;I think the workflow is not as smooth as you described. There will be different lighting legends, curved route, breaks or arc at intersection, etc.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 04 Feb 2015 10:57:40 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/connecting-blocks-with-line-or-arc-for-electrical-plans/m-p/5494476#M144116</guid>
      <dc:creator>3wood</dc:creator>
      <dc:date>2015-02-04T10:57:40Z</dc:date>
    </item>
    <item>
      <title>Re: Connecting blocks with line or arc for electrical plans</title>
      <link>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/connecting-blocks-with-line-or-arc-for-electrical-plans/m-p/5494639#M144117</link>
      <description>&lt;P&gt;I am sure there is no easy solution , esspecialy if you wat to choose light symbols, but one of the workarounds would be to have all light symbols in one block with several visual states. In that case routine would deal with connecting blocks with lines and the morfing them into arcs. You would have to manually change - select state for each block, but still would be helpful. Also idea for connecting line- "cord" could be arc constructed from block insert points and end point of a new temporary line set as perpendicular of certan lenght from midpoint.( see sketch attached- easy to draw , hard to explain)&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Is this too complicated?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;IMG title="El_pln_lsp.JPG" src="https://forums.autodesk.com/t5/image/serverpage/image-id/152403i880FD9E3C7DDFBB3/image-size/original?v=mpbl-1&amp;amp;px=-1" alt="El_pln_lsp.JPG" border="0" /&gt;&lt;/P&gt;</description>
      <pubDate>Wed, 04 Feb 2015 13:45:48 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/connecting-blocks-with-line-or-arc-for-electrical-plans/m-p/5494639#M144117</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2015-02-04T13:45:48Z</dc:date>
    </item>
    <item>
      <title>Re: Connecting blocks with line or arc for electrical plans</title>
      <link>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/connecting-blocks-with-line-or-arc-for-electrical-plans/m-p/5498557#M144118</link>
      <description>The insert point for our switches is different to the place the wire is attached to. However, most ceiling symbols will share insert point to wire point but not for the wall symbols.&lt;BR /&gt;&lt;BR /&gt;With that said, programming an auto-wire program will involve creating a selection set (entnext) and iterating thru the set to determine where to place the wire's ends based on the block name and it's rotation value. This will get rather involved as each symbol will require a closer look.&lt;BR /&gt;&lt;BR /&gt;Another mention is when new symbols are added, the program will have to be edited to accommodate these new symbols names and starting points for the wire. &lt;BR /&gt;&lt;BR /&gt;I'll throw this quick and dirty one at you - Continuous Wiring:&lt;BR /&gt;&lt;BR /&gt;(defun c:CW ( / a )&lt;BR /&gt; (graphscr)&lt;BR /&gt; (setq usercw (getpoint "Continuous Wiring \nSpecify start point of arc: "))&lt;BR /&gt; (while usercw&lt;BR /&gt;  (setq a (getpoint usercw "\nSpecify second point of arc: "))&lt;BR /&gt;  (if a&lt;BR /&gt;   (progn&lt;BR /&gt;    (command "arc" usercw a pause)&lt;BR /&gt;    (setq usercw (getvar "lastpoint"))&lt;BR /&gt;   );progn&lt;BR /&gt;   (setq usercw nil)&lt;BR /&gt;  );if&lt;BR /&gt; (setq a nil)&lt;BR /&gt; );while&lt;BR /&gt;);endCW&lt;BR /&gt;&lt;BR /&gt;??&lt;BR /&gt;</description>
      <pubDate>Fri, 06 Feb 2015 23:56:29 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/connecting-blocks-with-line-or-arc-for-electrical-plans/m-p/5498557#M144118</guid>
      <dc:creator>scot-65</dc:creator>
      <dc:date>2015-02-06T23:56:29Z</dc:date>
    </item>
    <item>
      <title>Re: Connecting blocks with line or arc for electrical plans</title>
      <link>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/connecting-blocks-with-line-or-arc-for-electrical-plans/m-p/5502331#M144119</link>
      <description>&lt;BLOCKQUOTE&gt;&lt;HR /&gt;@Anonymous wrote:&lt;BR /&gt;
&lt;P&gt;I am sure there is no easy solution , esspecialy if you wat to choose light symbols, but one of the workarounds would be to have all light symbols in one block with several visual states. In that case routine would deal with connecting blocks with lines and the morfing them into arcs. You would have to manually change - select state for each block, but still would be helpful. Also idea for connecting line- "cord" could be arc constructed from block insert points and end point of a new temporary line set as perpendicular of certan lenght from midpoint.( see sketch attached- easy to draw , hard to explain)&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Is this too complicated?&lt;/P&gt;
&lt;HR /&gt;&lt;/BLOCKQUOTE&gt;
&lt;P&gt;Hi Jan,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I have an old code, and &lt;SPAN class="hps"&gt;with some modifications&lt;/SPAN&gt;, &lt;SPAN class="hps alt-edited"&gt;will do the arcs connecting the inserted blocks.&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;EM&gt;&lt;SPAN class="hps alt-edited"&gt;'perpendicular of certan &lt;STRONG&gt;lenght&lt;/STRONG&gt; from midpoint'&lt;/SPAN&gt;&lt;/EM&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN class="hps alt-edited"&gt;The lenght will be &lt;SPAN class="hps"&gt;always the same&lt;/SPAN&gt;, or will have a relation (1/3 or 1/4) from the distance &lt;SPAN class="hps"&gt;between blocks?&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;SPAN class="hps alt-edited"&gt;&lt;SPAN class="hps"&gt;Henrique&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 10 Feb 2015 20:55:55 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/connecting-blocks-with-line-or-arc-for-electrical-plans/m-p/5502331#M144119</guid>
      <dc:creator>hmsilva</dc:creator>
      <dc:date>2015-02-10T20:55:55Z</dc:date>
    </item>
    <item>
      <title>Re: Connecting blocks with line or arc for electrical plans</title>
      <link>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/connecting-blocks-with-line-or-arc-for-electrical-plans/m-p/5511046#M144120</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;SPAN&gt;Scot,&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;Thanks for the answer. I was out of office for a few days.&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;In terms of arcs it is pretty&amp;nbsp;close. The thing is that you need to have that middle click, but it is ok.&amp;nbsp;I will be using it definutely.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Also, I realized that making the whole thing with inserting blocks etc too complicated, even in planning stage, not to mention programming.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks!&lt;/P&gt;&lt;P&gt;Jan&lt;/P&gt;</description>
      <pubDate>Wed, 18 Feb 2015 12:26:35 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/connecting-blocks-with-line-or-arc-for-electrical-plans/m-p/5511046#M144120</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2015-02-18T12:26:35Z</dc:date>
    </item>
    <item>
      <title>Re: Connecting blocks with line or arc for electrical plans</title>
      <link>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/connecting-blocks-with-line-or-arc-for-electrical-plans/m-p/5511050#M144121</link>
      <description>&lt;P&gt;Hi H,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;As I said, I was out of office for a few days.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;If you can share that code , maybe it will be useful.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks!&lt;/P&gt;&lt;P&gt;Jan&lt;/P&gt;</description>
      <pubDate>Wed, 18 Feb 2015 12:27:53 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/connecting-blocks-with-line-or-arc-for-electrical-plans/m-p/5511050#M144121</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2015-02-18T12:27:53Z</dc:date>
    </item>
    <item>
      <title>Re: Connecting blocks with line or arc for electrical plans</title>
      <link>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/connecting-blocks-with-line-or-arc-for-electrical-plans/m-p/5511255#M144122</link>
      <description>&lt;BLOCKQUOTE&gt;&lt;HR /&gt;@Anonymous wrote:&lt;BR /&gt;
&lt;P&gt;.... The thing is that you need to have that middle click, but ....&amp;nbsp; Also, ... the whole thing with inserting blocks etc too complicated....&lt;/P&gt;
&lt;HR /&gt;&lt;/BLOCKQUOTE&gt;
&lt;P&gt;For &lt;EM&gt;already-inserted&lt;/EM&gt; Blocks, here's a way to&amp;nbsp;make continuous Arcs connecting them&amp;nbsp;that &lt;EM&gt;doesn't&lt;/EM&gt; require "that middle click," but only the picking on each Block in series.&amp;nbsp; It doesn't use a constant bulge &lt;EM&gt;distance&lt;/EM&gt; at the midpoint of each Arc as mentioned earlier [which would result in very different degrees of bulge at different lengths], but rather a constant &lt;EM&gt;starting-direction angle&lt;/EM&gt; relative to the angle between the endpoints, for a consistent degree of bulge.&amp;nbsp; I picked what looks to me like a reasonable degree of bulginess, but you can adjust that.&amp;nbsp; It always bulges in the generally more upward direction.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Be aware that it's possible it will Snap to the insertion point of some &lt;EM&gt;nested entity within&lt;/EM&gt; a given Block, if there are any such things, rather than to that of the Block itself, so if that's a possibility, be watchful while using it -- you can see what it's going to snap to before you pick.&amp;nbsp; And it should, of course, be fleshed out to save the OSMODE value first and reset it later, etc., but see what you think:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;(defun C:WA (/ pt1 pt2); = Wiring Arcs&lt;BR /&gt;&amp;nbsp; (setvar 'osmode 64); Insertion&lt;BR /&gt;&amp;nbsp; (setq pt1 (getpoint "\nStart point for Arc(s): "))&lt;BR /&gt;&amp;nbsp; (while (setq pt2 (getpoint "\nEnd of Arc: "))&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; (command&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; "_.arc" pt1 "_e" pt2 "_direction" ; [spelling out "_end" is taken as Osnap call]&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; (angtos (apply (if (&amp;gt; (car pt2) (car pt1)) '+ '-) (list (angle pt1 pt2) (/ pi 5))))&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; ; change 5 above to lower number for more bulge, higher for less&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; ); command&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; (setq pt1 pt2); for start of next Arc&lt;BR /&gt;&amp;nbsp; ); while&lt;BR /&gt;); defun&lt;/P&gt;</description>
      <pubDate>Wed, 18 Feb 2015 14:43:41 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/connecting-blocks-with-line-or-arc-for-electrical-plans/m-p/5511255#M144122</guid>
      <dc:creator>Kent1Cooper</dc:creator>
      <dc:date>2015-02-18T14:43:41Z</dc:date>
    </item>
    <item>
      <title>Re: Connecting blocks with line or arc for electrical plans</title>
      <link>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/connecting-blocks-with-line-or-arc-for-electrical-plans/m-p/5511262#M144123</link>
      <description>&lt;BLOCKQUOTE&gt;&lt;HR /&gt;@Anonymous wrote:&lt;BR /&gt;
&lt;P&gt;If you can share that code , maybe it will be useful.&lt;/P&gt;
&lt;HR /&gt;&lt;/BLOCKQUOTE&gt;
&lt;P&gt;Hi Jan,&lt;/P&gt;
&lt;P&gt;&lt;SPAN class="hps"&gt;of course I will&lt;/SPAN&gt; &lt;SPAN class="hps"&gt;share&lt;/SPAN&gt; &lt;SPAN class="hps"&gt;the code&lt;/SPAN&gt;, &lt;SPAN class="hps"&gt;can you&lt;/SPAN&gt; &lt;SPAN class="hps"&gt;just&lt;/SPAN&gt; &lt;SPAN class="hps"&gt;answer&lt;/SPAN&gt; &lt;SPAN class="hps"&gt;this question&lt;/SPAN&gt; please...&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;'&lt;SPAN class="hps alt-edited"&gt;The lenght will be &lt;SPAN class="hps"&gt;always the same&lt;/SPAN&gt;, or will have a relation (1/3 or 1/4) from the distance &lt;SPAN class="hps"&gt;between blocks?&lt;/SPAN&gt;&lt;/SPAN&gt;'&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Henrique&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 18 Feb 2015 14:47:50 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/connecting-blocks-with-line-or-arc-for-electrical-plans/m-p/5511262#M144123</guid>
      <dc:creator>hmsilva</dc:creator>
      <dc:date>2015-02-18T14:47:50Z</dc:date>
    </item>
    <item>
      <title>Re: Connecting blocks with line or arc for electrical plans</title>
      <link>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/connecting-blocks-with-line-or-arc-for-electrical-plans/m-p/5511279#M144124</link>
      <description>&lt;P&gt;Ahh, sorry I thought you will leave me to modify it (which i am not sure that i would manage) &lt;span class="lia-unicode-emoji" title=":slightly_smiling_face:"&gt;🙂&lt;/span&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I guess it will be better to have 1/4... I think i will be able to modify ratio to 1/3 ...&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks&lt;/P&gt;&lt;P&gt;Jan&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 18 Feb 2015 14:59:06 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/connecting-blocks-with-line-or-arc-for-electrical-plans/m-p/5511279#M144124</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2015-02-18T14:59:06Z</dc:date>
    </item>
    <item>
      <title>Re: Connecting blocks with line or arc for electrical plans</title>
      <link>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/connecting-blocks-with-line-or-arc-for-electrical-plans/m-p/5511300#M144125</link>
      <description>&lt;P&gt;Hi Kent,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks for the effort. It works great and in the more timesaving manner. The catch with osnapmode is cool. At first i didnt realize that osnap works, because i want clicking near blocks &lt;span class="lia-unicode-emoji" title=":slightly_smiling_face:"&gt;🙂&lt;/span&gt; but than i realizet that "64" is&amp;nbsp;&lt;SPAN&gt;INSertion.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;Best&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;Jan&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Wed, 18 Feb 2015 15:16:50 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/connecting-blocks-with-line-or-arc-for-electrical-plans/m-p/5511300#M144125</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2015-02-18T15:16:50Z</dc:date>
    </item>
    <item>
      <title>Re: Connecting blocks with line or arc for electrical plans</title>
      <link>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/connecting-blocks-with-line-or-arc-for-electrical-plans/m-p/5511305#M144126</link>
      <description>&lt;BLOCKQUOTE&gt;&lt;HR /&gt;jahbgd wrote:
&lt;P&gt;I guess it will be better to have 1/4... I think i will be able to modify ratio to 1/3 ...&lt;/P&gt;
&lt;HR /&gt;&lt;/BLOCKQUOTE&gt;
&lt;P&gt;Jan,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;you'll need to change the "H:\\your\\block\\library\\path\\" to the correct path...&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;(defun c:demo (/ *error* insrt -ang ang ang1 ang2 blk blk1 blk2 pt1 pt2 pt3 pt4)

  (defun *error* (msg)
    (cond
      ((not msg))
      ((wcmatch (strcase msg) "*QUIT*,*CANCEL*"))
      (T (princ (strcat "\nError: " msg)))
    )
    (princ)
  )

  (defun insrt (/ ans blk flag)
    (setq flag t)
    (while flag
      (if (or blk
              (/= (setq blk (getvar 'INSNAME)) "")
          )
        (progn
          (initget "Blockname")
          (setq ans (getpoint
                      (strcat "\n Specify insertion point for '" blk "' or [Blockname] &amp;lt;exit&amp;gt;:")
                    )
          )
        )
        (setq ans "Blockname")
      )
      (cond ((= 'list (type ans))
             (command "-insert" blk ans)
             (while (&amp;gt; (getvar 'cmdactive) 0)
               (command "\\")
             )
             (setq flag nil)
             (entlast)
            )
            ((and ans (wcmatch ans "Blockname"))
             (if (not (setq blk (getfiled "Select a block"
                                          "H:\\your\\block\\library\\path\\"
                                          "dwg"
                                          0
                                )
                      )
                 )
               (setq flag nil)
             )
            )
            ((null ans)
             (princ "\n Exiting...")
             (setq flag nil)
            )
      )
    )
  )

  (setq blk (entlast))
  (if (and (setq blk1 (insrt))
           (not (eq blk blk1))
           (setq pt1 (trans (cdr (assoc 10 (entget blk1))) 0 1))
           (setq blk2 (insrt))
      )
    (while (and (not (null blk2))
                (not (eq blk1 blk2))
           )
      (setq pt2  (trans (cdr (assoc 10 (entget blk2))) 0 1)
            pt3  (polar pt1 (angle pt1 pt2) (/ (distance pt1 pt2) 2.0))
            ang  (angle pt3 pt2)
            -ang (angle pt2 pt3)
      )
      (grvecs (list -2 pt1 pt3 pt3 pt2))
      (if (setq pt4 (getpoint pt3 "\n Pick arc side: "))
        (progn
          (setq ang1 (angle pt3 pt4))
          (if (&amp;lt; ang -ang)
            (if (&amp;lt;= ang ang1 -ang)
              (setq ang2 (/ (+ -ang ang) 2))
              (setq ang2 (+ (/ (+ -ang ang) 2) pi))
            )
            (if (&amp;lt;= -ang ang1 ang)
              (setq ang2 (/ (+ -ang ang) 2))
              (setq ang2 (+ (/ (+ -ang ang) 2) pi))
            )
          )
          (command "_.redraw")
          (command "_.arc" "_NONE" pt1 "_NONE" (polar pt3 ang2 (/ (distance pt1 pt2) 3) "_NONE" pt2)
          (setq pt1  pt2
                blk1 blk2
                blk2 (insrt)
          )
        )
        (command "_.redraw")
      )
    )
  )
  (*error* nil)
  (princ)
)&lt;/PRE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Hope this helps, &lt;BR /&gt;Henrique&lt;/P&gt;</description>
      <pubDate>Wed, 18 Feb 2015 15:18:59 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/connecting-blocks-with-line-or-arc-for-electrical-plans/m-p/5511305#M144126</guid>
      <dc:creator>hmsilva</dc:creator>
      <dc:date>2015-02-18T15:18:59Z</dc:date>
    </item>
    <item>
      <title>Re: Connecting blocks with line or arc for electrical plans</title>
      <link>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/connecting-blocks-with-line-or-arc-for-electrical-plans/m-p/5511435#M144127</link>
      <description>&lt;P&gt;Jan,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;SPAN class="hps"&gt;I can no longer&lt;/SPAN&gt; &lt;SPAN class="hps"&gt;edit my&lt;/SPAN&gt; &lt;SPAN class="hps"&gt;previous post&lt;/SPAN&gt;, so you'll need to add&amp;nbsp;one ")" in&lt;/P&gt;
&lt;PRE&gt; (command "_.arc" "_NONE" pt1 "_NONE" (polar pt3 ang2 (/ (distance pt1 pt2) 3)&lt;STRONG&gt;&lt;FONT color="#ff0000"&gt;)&lt;/FONT&gt;&lt;/STRONG&gt; "_NONE" pt2)&lt;/PRE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Henrique&lt;/P&gt;</description>
      <pubDate>Wed, 18 Feb 2015 16:28:28 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/connecting-blocks-with-line-or-arc-for-electrical-plans/m-p/5511435#M144127</guid>
      <dc:creator>hmsilva</dc:creator>
      <dc:date>2015-02-18T16:28:28Z</dc:date>
    </item>
    <item>
      <title>Re: Connecting blocks with line or arc for electrical plans</title>
      <link>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/connecting-blocks-with-line-or-arc-for-electrical-plans/m-p/5521349#M144128</link>
      <description>&lt;P&gt;&lt;SPAN&gt;Henrique,&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;Thanks for message and sorry for late answer.&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;I tried routine, but I find it a bit confusing.&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;It asks for a block(file) so there is a problem with basepoint, as it doesent use block basepoint but from file (i guess), and then there is connecting line problem, related to basepoint issue.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;Sorry for the trouble, but if you decide to spend more time on this, i would suggest eliminating scale block part, maybe leave rotate, and in generating arcs, make fix ratio.I my personal opinion, it has too many option to select every time you use routine.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;Anyhow thanks again for looking into this.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;Cheers&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;Jan&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Thu, 26 Feb 2015 14:24:38 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/connecting-blocks-with-line-or-arc-for-electrical-plans/m-p/5521349#M144128</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2015-02-26T14:24:38Z</dc:date>
    </item>
    <item>
      <title>Re: Connecting blocks with line or arc for electrical plans</title>
      <link>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/connecting-blocks-with-line-or-arc-for-electrical-plans/m-p/5521470#M144129</link>
      <description>&lt;BLOCKQUOTE&gt;&lt;HR /&gt;@Anonymous wrote:&lt;BR /&gt;
&lt;P&gt;&lt;SPAN&gt;Henrique,&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;Thanks for message and sorry for late answer.&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;I tried routine, but I find it a bit confusing.&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;It asks for a block(file) so there is a problem with basepoint, as it doesent use block basepoint but from file (i guess), and then there is connecting line problem, related to basepoint issue.&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;Sorry for the trouble, but if you decide to spend more time on this, i would suggest eliminating scale block part, maybe leave rotate, and in generating arcs, make fix ratio.I my personal opinion, it has too many option to select every time you use routine.&lt;/SPAN&gt;&lt;/P&gt;
&lt;HR /&gt;&lt;/BLOCKQUOTE&gt;
&lt;P&gt;You're welcome, Jan!&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;- &lt;EM&gt;&lt;STRONG&gt;'I tried routine, but I find it a bit confusing.'&lt;/STRONG&gt;&lt;/EM&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;&amp;nbsp; &lt;SPAN class="hps"&gt;What is the&lt;/SPAN&gt; &lt;SPAN class="hps"&gt;command&lt;/SPAN&gt; &lt;SPAN class="hps"&gt;you use to&lt;/SPAN&gt; insert the blocks?&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;&amp;nbsp; Via tool Palettes?&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;&amp;nbsp; Command 'insert'?&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;&amp;nbsp; &lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN class="hps"&gt;- &lt;STRONG&gt;&lt;EM&gt;Block&lt;/EM&gt;&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;STRONG&gt;&lt;EM&gt; &lt;SPAN class="hps"&gt;insertion&lt;/SPAN&gt; &lt;SPAN class="hps"&gt;point...&lt;/SPAN&gt;&lt;/EM&gt;&lt;/STRONG&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN class="hps"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;How is &lt;SPAN class="hps"&gt;your&lt;/SPAN&gt; &lt;SPAN class="hps"&gt;block library&lt;/SPAN&gt; &lt;SPAN class="hps"&gt;defined?&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN class="hps"&gt;&lt;SPAN class="hps"&gt;&amp;nbsp;&amp;nbsp; Each block is &lt;SPAN class="hps"&gt;an independent file&lt;/SPAN&gt;, or all the blocks are in one file?&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;SPAN class="hps"&gt;&lt;SPAN class="hps"&gt;_ &lt;STRONG&gt;&lt;EM&gt;'i would suggest eliminating scale block part, maybe leave rotate, and in generating arcs, make fix ratio.I my personal opinion, it has too many option to select every time you use routine.'&lt;/EM&gt;&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN class="hps"&gt;&lt;SPAN class="hps"&gt;&lt;STRONG&gt;&lt;EM&gt;&amp;nbsp;&amp;nbsp; &lt;/EM&gt;&lt;/STRONG&gt;Eliminate the scale, no problem.&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN class="hps"&gt;&lt;SPAN class="hps"&gt;&amp;nbsp;&amp;nbsp; The arcs have a fix ratio, the user have to pick one side for the arc...&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN class="hps"&gt;&lt;SPAN class="hps"&gt;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN class="hps"&gt;&lt;SPAN class="hps"&gt;Henrique&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Thu, 26 Feb 2015 15:26:50 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/connecting-blocks-with-line-or-arc-for-electrical-plans/m-p/5521470#M144129</guid>
      <dc:creator>hmsilva</dc:creator>
      <dc:date>2015-02-26T15:26:50Z</dc:date>
    </item>
    <item>
      <title>Re: Connecting blocks with line or arc for electrical plans</title>
      <link>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/connecting-blocks-with-line-or-arc-for-electrical-plans/m-p/5627773#M144130</link>
      <description>&lt;P&gt;Hi, since I'm little sick.. I tried another method.&amp;nbsp;You gonna need an extra line or polyline to show it's direction. Then you select BLOCKs or CIRCLEs and that polyline all together...&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;IMG title="wire.png" src="https://forums.autodesk.com/t5/image/serverpage/image-id/167628i3FB80A98775054F8/image-size/original?v=mpbl-1&amp;amp;px=-1" border="0" alt="wire.png" /&gt;&lt;/P&gt;</description>
      <pubDate>Fri, 08 May 2015 23:13:26 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/connecting-blocks-with-line-or-arc-for-electrical-plans/m-p/5627773#M144130</guid>
      <dc:creator>ВeekeeCZ</dc:creator>
      <dc:date>2015-05-08T23:13:26Z</dc:date>
    </item>
    <item>
      <title>Re: Connecting blocks with line or arc for electrical plans</title>
      <link>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/connecting-blocks-with-line-or-arc-for-electrical-plans/m-p/5627798#M144131</link>
      <description>&lt;P&gt;Little change to make all bunges same high.&lt;/P&gt;</description>
      <pubDate>Fri, 08 May 2015 23:53:38 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/connecting-blocks-with-line-or-arc-for-electrical-plans/m-p/5627798#M144131</guid>
      <dc:creator>ВeekeeCZ</dc:creator>
      <dc:date>2015-05-08T23:53:38Z</dc:date>
    </item>
    <item>
      <title>Re: Connecting blocks with line or arc for electrical plans</title>
      <link>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/connecting-blocks-with-line-or-arc-for-electrical-plans/m-p/6802923#M144132</link>
      <description>&lt;P&gt;Hi,&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;This is a helpful command for me. However, when i use this command my snap settings are unchecked. Is there a way to keep my snaps checked when I use this command.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thank you.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Regards,&amp;nbsp;&lt;/P&gt;&lt;P&gt;Anesah&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 13 Jan 2017 05:28:04 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/connecting-blocks-with-line-or-arc-for-electrical-plans/m-p/6802923#M144132</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2017-01-13T05:28:04Z</dc:date>
    </item>
    <item>
      <title>Re: Connecting blocks with line or arc for electrical plans</title>
      <link>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/connecting-blocks-with-line-or-arc-for-electrical-plans/m-p/6803521#M144133</link>
      <description>&lt;BLOCKQUOTE&gt;&lt;HR /&gt;@Anonymous wrote:&lt;BR /&gt;
&lt;P&gt;...&amp;nbsp;when i use this command my snap settings are unchecked. Is there a way to keep my snaps checked when I use this command.&lt;/P&gt;
&lt;P&gt;....&amp;nbsp;&lt;/P&gt;
&lt;HR /&gt;&lt;/BLOCKQUOTE&gt;
&lt;P&gt;Remove this line:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp; (setvar 'osmode 64); Insertion&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;[which was part of the OP's process, to lock onto each Block's insertion point], and whatever your current Osnap settings are will remain.&lt;/P&gt;</description>
      <pubDate>Fri, 13 Jan 2017 12:43:55 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/connecting-blocks-with-line-or-arc-for-electrical-plans/m-p/6803521#M144133</guid>
      <dc:creator>Kent1Cooper</dc:creator>
      <dc:date>2017-01-13T12:43:55Z</dc:date>
    </item>
    <item>
      <title>Re: Connecting blocks with line or arc for electrical plans</title>
      <link>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/connecting-blocks-with-line-or-arc-for-electrical-plans/m-p/6804241#M144134</link>
      <description>&lt;BLOCKQUOTE&gt;&lt;HR /&gt;@Anonymous wrote:&lt;BR /&gt;
&lt;P&gt;....&amp;nbsp;when i use this command my snap settings are unchecked. Is there a way to keep my snaps checked when I use this command.&lt;/P&gt;
&lt;P&gt;....&amp;nbsp;&lt;/P&gt;
&lt;HR /&gt;&lt;/BLOCKQUOTE&gt;
&lt;P&gt;Come to think of it....&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;If by that you mean that you want&amp;nbsp;your Osnap mode combination&amp;nbsp;&lt;EM&gt;restored after&lt;/EM&gt; running the routine, but you want it to use Insertion mode only &lt;EM&gt;during&lt;/EM&gt; the routine [because you're wiring Blocks, like the OP], this will do that:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;(defun C:WA (/ *error* osm pt1 pt2); = Wiring Arcs
  (defun *error* (errmsg)
    (if (not (wcmatch errmsg "Function cancelled,quit / exit abort,console break"))
      (princ (strcat "\nError: " errmsg))
    ); if
    (setvar 'osmode osm)
  ); defun - *error*
  (setq osm (getvar 'osmode))
  (setvar 'osmode 64); Insertion
  (setq pt1 (getpoint "\nStart point for Arc(s): "))
  (while (setq pt2 (getpoint "\nEnd of Arc: "))
    (command
      "_.arc" pt1 "_e" pt2 "_direction" ; [spelling out "_end" is taken as Osnap call]
      (angtos (apply (if (&amp;gt; (car pt2) (car pt1)) '+ '-) (list (angle pt1 pt2) (/ pi 5))))
        ; change 5 above to lower number for more bulge, higher for less
    ); command
    (setq pt1 pt2); for start of next Arc
  ); while
  (setvar 'osmode osm)
); defun&lt;/PRE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Or, if you want to &lt;EM&gt;add&lt;/EM&gt; Insertion mode to your Osnap modes for snapping to Block insertion points, if it's not already among them,&amp;nbsp;&lt;EM&gt;but&lt;/EM&gt; still keep other modes that you have running, replace this line above:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp; (setvar 'osmode 64);&amp;nbsp;Insertion&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;with this:&lt;/P&gt;
&lt;P&gt;&amp;nbsp; (setvar 'osmode (logior 64 (getvar 'osmode)));&amp;nbsp;add Insertion if not already there&lt;/P&gt;</description>
      <pubDate>Fri, 13 Jan 2017 16:22:58 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/connecting-blocks-with-line-or-arc-for-electrical-plans/m-p/6804241#M144134</guid>
      <dc:creator>Kent1Cooper</dc:creator>
      <dc:date>2017-01-13T16:22:58Z</dc:date>
    </item>
  </channel>
</rss>

