<?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: Auto draw object in AutoCAD Forum</title>
    <link>https://forums.autodesk.com/t5/autocad-forum/auto-draw-object/m-p/9790764#M94325</link>
    <description>&lt;BLOCKQUOTE&gt;&lt;HR /&gt;&lt;a href="https://forums.autodesk.com/t5/user/viewprofilepage/user-id/7963331"&gt;@aliff_ahtenk&lt;/a&gt;&amp;nbsp;wrote:&lt;BR /&gt;
&lt;P&gt;...&amp;nbsp; it does not work on the scale..&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;HR /&gt;&lt;/BLOCKQUOTE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;While the lisp is running the OSNAP must not be ON.&lt;/P&gt;
&lt;P&gt;Either you disable it manually (F3) (and do never forgot it before each starting the LISP) or you add a line in the code to set the system variable OSNAPCOORD to 1. (I guess you have it set to 2).&lt;/P&gt;
&lt;P&gt;The scaling works well for me. &lt;A href="https://autode.sk/34DFf4m" target="_blank" rel="noopener"&gt;&amp;gt;&amp;gt;video&amp;lt;&amp;lt; &lt;/A&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;The next steps will be (a rough draft):&lt;/P&gt;
&lt;P&gt;The moving, scaling and rotating should be removed in the code above. We will do it later (while inserting the block).&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;- Create a block name string using &lt;EM&gt;(strcat (FD (rtos sf))&lt;/EM&gt;&lt;/P&gt;
&lt;P&gt;- Test if this block name already exists.&amp;nbsp; If yes, erase the selection set ss and skip the next step.&lt;/P&gt;
&lt;P&gt;- create a new block definition&lt;/P&gt;
&lt;P&gt;&amp;nbsp; * Basepoint: will be &lt;EM&gt;P0&lt;/EM&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp; * objects: will be the selection set &lt;EM&gt;ss&lt;/EM&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp; * Blockname: use the name defined above&lt;BR /&gt;- insert the block at P0.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Try it.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;BTW: This strategy is not very well, because with each using of this lisp will first drawn exactly the same objects. &lt;a href="https://forums.autodesk.com/t5/user/viewprofilepage/user-id/69526"&gt;@Kent1Cooper&lt;/a&gt;'s hints above pointed in a better direction.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Thu, 08 Oct 2020 07:59:13 GMT</pubDate>
    <dc:creator>j.palmeL29YX</dc:creator>
    <dc:date>2020-10-08T07:59:13Z</dc:date>
    <item>
      <title>Auto draw object</title>
      <link>https://forums.autodesk.com/t5/autocad-forum/auto-draw-object/m-p/9783665#M94315</link>
      <description>&lt;P&gt;Hi all, can anybody help me on this, I want to use this object as lisp, but I don't know how to start.&lt;/P&gt;&lt;P&gt;I want to take a starting point at block point.&lt;/P&gt;&lt;P&gt;then it auto draw the object,&lt;/P&gt;&lt;P&gt;the object is selected and rescale for some size,&lt;/P&gt;&lt;P&gt;then block with scale code name,&lt;/P&gt;&lt;P&gt;then finally object is select again to choose direction to place..&lt;/P&gt;&lt;P&gt;Thank you in advance.&lt;/P&gt;</description>
      <pubDate>Mon, 05 Oct 2020 04:28:57 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/autocad-forum/auto-draw-object/m-p/9783665#M94315</guid>
      <dc:creator>aliff_ahtenk</dc:creator>
      <dc:date>2020-10-05T04:28:57Z</dc:date>
    </item>
    <item>
      <title>Re: Auto draw object</title>
      <link>https://forums.autodesk.com/t5/autocad-forum/auto-draw-object/m-p/9783683#M94316</link>
      <description>&lt;P&gt;What is the goal of this task? Why do you want to draw it with LISP if you have it already drawn.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;You can add some dynamic parameters and actions for quick scaling and placing the block.&lt;/P&gt;
&lt;P&gt;What do you mean with "then block with scale code name"?&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 05 Oct 2020 05:20:24 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/autocad-forum/auto-draw-object/m-p/9783683#M94316</guid>
      <dc:creator>j.palmeL29YX</dc:creator>
      <dc:date>2020-10-05T05:20:24Z</dc:date>
    </item>
    <item>
      <title>Re: Auto draw object</title>
      <link>https://forums.autodesk.com/t5/autocad-forum/auto-draw-object/m-p/9783762#M94317</link>
      <description>&lt;P&gt;it is because i dont want to store in the template. so i just make one lisp, a single command, insert size and rotate.. so the object will be make itself.&lt;/P&gt;</description>
      <pubDate>Mon, 05 Oct 2020 06:31:41 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/autocad-forum/auto-draw-object/m-p/9783762#M94317</guid>
      <dc:creator>aliff_ahtenk</dc:creator>
      <dc:date>2020-10-05T06:31:41Z</dc:date>
    </item>
    <item>
      <title>Re: Auto draw object</title>
      <link>https://forums.autodesk.com/t5/autocad-forum/auto-draw-object/m-p/9783930#M94318</link>
      <description>&lt;BLOCKQUOTE&gt;&lt;HR /&gt;&lt;a href="https://forums.autodesk.com/t5/user/viewprofilepage/user-id/7963331"&gt;@aliff_ahtenk&lt;/a&gt;&amp;nbsp;wrote:&lt;BR /&gt;
&lt;P&gt;it is because i dont want to store in the template.&lt;/P&gt;
&lt;HR /&gt;&lt;/BLOCKQUOTE&gt;
&lt;P&gt;You can store it anywhere. Then insert this as block (using the insert command, or drag it into your current drawing, or use the DesignCenter, or use a Toolpalette, or ... what you want).&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 05 Oct 2020 08:37:06 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/autocad-forum/auto-draw-object/m-p/9783930#M94318</guid>
      <dc:creator>j.palmeL29YX</dc:creator>
      <dc:date>2020-10-05T08:37:06Z</dc:date>
    </item>
    <item>
      <title>Re: Auto draw object</title>
      <link>https://forums.autodesk.com/t5/autocad-forum/auto-draw-object/m-p/9786040#M94319</link>
      <description>&lt;P&gt;yup, that is the method that i currently use. tq. class dismiss.&lt;/P&gt;</description>
      <pubDate>Tue, 06 Oct 2020 08:09:26 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/autocad-forum/auto-draw-object/m-p/9786040#M94319</guid>
      <dc:creator>aliff_ahtenk</dc:creator>
      <dc:date>2020-10-06T08:09:26Z</dc:date>
    </item>
    <item>
      <title>Re: Auto draw object</title>
      <link>https://forums.autodesk.com/t5/autocad-forum/auto-draw-object/m-p/9786431#M94320</link>
      <description>&lt;P&gt;If you already know how you should be doing it, why did you ask for a LISP?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;BTW, there is a separate forum for LISP and other customizations.&lt;/P&gt;</description>
      <pubDate>Tue, 06 Oct 2020 11:12:02 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/autocad-forum/auto-draw-object/m-p/9786431#M94320</guid>
      <dc:creator>RobDraw</dc:creator>
      <dc:date>2020-10-06T11:12:02Z</dc:date>
    </item>
    <item>
      <title>Re: Auto draw object</title>
      <link>https://forums.autodesk.com/t5/autocad-forum/auto-draw-object/m-p/9786640#M94321</link>
      <description>&lt;BLOCKQUOTE&gt;&lt;HR /&gt;&lt;a href="https://forums.autodesk.com/t5/user/viewprofilepage/user-id/7963331"&gt;@aliff_ahtenk&lt;/a&gt;&amp;nbsp;wrote:&lt;BR /&gt;
&lt;P&gt;... that is the method that i currently use.&lt;/P&gt;
&lt;HR /&gt;&lt;/BLOCKQUOTE&gt;
&lt;P&gt;That you didn't tell us ...&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Well. If you urgently want to use a LISP, here an (simplified and rough) example how you can do it:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;LI-CODE lang="markup"&gt;(defun c:test (/)
  (setq P0 (getpoint "\nWhere to insert: "))
  (setq SF (getdist "\nScale factor: "))
  (setq RA (getreal "\nRotation angle: "))
  (setq ss (ssadd))  ; create selection set

  (command "_arc" "_C" '(-1090 0) '(-346 -175) '(-346 175))   ; 1st arc
  (ssadd (entlast) ss)   ; add to selection set
  (command "_arc" "_C" '(-796.5 0) '(-305.5 -198) '(-305.5 198))  ; 2nd arc
  (ssadd (entlast) ss)   ; add to selection set
;;; ...   repeat for all arc's

  (command "_line" '(-346 -175) '(-305.5 -198) "")
  (ssadd (entlast) ss)
  (command "_line" '(-346 175) '(-305.5 198) "")
  (ssadd (entlast) ss)
;;; ... repeat for all lines
;; if complete geometry is drawn, modify it (move, scale, rotate)
  (command "_move" ss "" '(0 0) P0)
  (command "_scale" ss "" p0 sf)
  (command "rotate" ss "" p0 ra)
  (princ)
 )

;; HTH for a beginning&lt;/LI-CODE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;It does the job for the first 2 arcs and their connecting lines (the dimensions of the geometry were rounded) . You can complete it yourselfe for the remaining arcs and lines.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;But again: I can not understand why you don't want to use the current method (insert block). What advantages or improvements do you expect from a LISP routine?&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;(And I still don't know what is "then block with scale code name," ?)&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 06 Oct 2020 13:00:50 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/autocad-forum/auto-draw-object/m-p/9786640#M94321</guid>
      <dc:creator>j.palmeL29YX</dc:creator>
      <dc:date>2020-10-06T13:00:50Z</dc:date>
    </item>
    <item>
      <title>Re: Auto draw object</title>
      <link>https://forums.autodesk.com/t5/autocad-forum/auto-draw-object/m-p/9786701#M94322</link>
      <description>&lt;BLOCKQUOTE&gt;&lt;HR /&gt;&lt;a href="https://forums.autodesk.com/t5/user/viewprofilepage/user-id/5952317"&gt;@j.palmeL29YX&lt;/a&gt;&amp;nbsp;wrote:
&lt;P class="1601989024138"&gt;&lt;SPAN style="font-family: inherit;"&gt;....&lt;/SPAN&gt;&lt;/P&gt;
&lt;/BLOCKQUOTE&gt;
&lt;BLOCKQUOTE&gt;
&lt;P&gt;(And I still don't know what is "then block with scale code name," ?)&lt;/P&gt;
&lt;HR /&gt;&lt;/BLOCKQUOTE&gt;
&lt;P&gt;I think they want, after scaling the drawn results [the line before that], to define them as a Block &lt;EM&gt;whose name includes an indication of the scale&lt;/EM&gt;.&amp;nbsp; Then they could have separate Blocks with the scale- or size-indication difference in otherwise the same Block name, in the same drawing.&amp;nbsp;&amp;nbsp;&lt;a href="https://forums.autodesk.com/t5/user/viewprofilepage/user-id/7963331"&gt;@aliff_ahtenk&lt;/a&gt;&amp;nbsp;, is that correct?&amp;nbsp; If so, I think it would still be easier to have a routine Insert the "base" version as a Block, scale that, Explode it and define it as a new Block name with scale indication, than it would be to have a routine draw all the pieces every time.&lt;/P&gt;</description>
      <pubDate>Tue, 06 Oct 2020 13:10:32 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/autocad-forum/auto-draw-object/m-p/9786701#M94322</guid>
      <dc:creator>Kent1Cooper</dc:creator>
      <dc:date>2020-10-06T13:10:32Z</dc:date>
    </item>
    <item>
      <title>Re: Auto draw object</title>
      <link>https://forums.autodesk.com/t5/autocad-forum/auto-draw-object/m-p/9788524#M94323</link>
      <description>&lt;P&gt;Bro i am sorry i have been rude to you early.. but i am not in the mood that day..&lt;/P&gt;&lt;P&gt;But after thinking several ways, i think to use insert command in lisp.&lt;/P&gt;&lt;P&gt;Thank for your code, i am very greatful today. I will try it later.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;This is what i found but dont know how to select the size.&lt;/P&gt;&lt;P&gt;I found that insert function already have the rotation if not skipped.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;(defun c:fd ()&lt;BR /&gt;(setq insertpt1 (getpoint "\nSelect Flexible Dropper Point: "))&lt;BR /&gt;(command "_insert" "FD100" insertpt1 "" "")&lt;BR /&gt;(princ)&lt;BR /&gt;)&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Code not try yet..&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I would like to call these block name:&lt;/P&gt;&lt;P&gt;if user insert 100 it will insert block "FD100"&lt;/P&gt;&lt;P&gt;if user insert 150 it will insert block "FD150"&lt;/P&gt;&lt;P&gt;if user insert 200 it will insert block "FD200"&lt;/P&gt;&lt;P&gt;if user insert 250 it will insert block "FD250"&lt;/P&gt;&lt;P&gt;if user insert 300 it will insert block "FD300"&lt;/P&gt;&lt;P&gt;if user insert 350 it will insert block "FD350"&lt;/P&gt;&lt;P&gt;if user insert other value it will ask again to insert the size.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks all for helping me on this lisp..&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 07 Oct 2020 09:13:24 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/autocad-forum/auto-draw-object/m-p/9788524#M94323</guid>
      <dc:creator>aliff_ahtenk</dc:creator>
      <dc:date>2020-10-07T09:13:24Z</dc:date>
    </item>
    <item>
      <title>Re: Auto draw object</title>
      <link>https://forums.autodesk.com/t5/autocad-forum/auto-draw-object/m-p/9790488#M94324</link>
      <description>&lt;P&gt;Bro i already finish the point, but it does not work on the scale..&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;this is the finish lisp:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;(defun c:dfd (/)&lt;BR /&gt;(setq P0 (getpoint "\nSelect Flexible Dropper Point: "))&lt;BR /&gt;(setq SF (getdist "\nInsert Size: "))&lt;BR /&gt;(setq RA (getreal "\nDirection to Connect: "))&lt;BR /&gt;(setq ss (ssadd)) ; create selection set&lt;/P&gt;&lt;P&gt;(command "_arc" "_C" '(311.48 0) '(98.92 50) '(98.92 -50)) ; 1st arc&lt;BR /&gt;(ssadd (entlast) ss) ; add to selection set&lt;BR /&gt;(command "_arc" "_C" '(227.58 0) '(87.35 56.68) '(87.35 -56.68)) ; 2nd arc&lt;BR /&gt;(ssadd (entlast) ss) ; add to selection set&lt;BR /&gt;(command "_arc" "_C" '(155.01 0) '(70.55 49.98) '(70.55 -49.98)) ; 3rd arc&lt;BR /&gt;(ssadd (entlast) ss) ; add to selection set&lt;BR /&gt;(command "_arc" "_C" '(123.34 0) '(61.24 55.36) '(61.24 -55.36)) ; 4th arc&lt;BR /&gt;(ssadd (entlast) ss) ; add to selection set&lt;BR /&gt;(command "_arc" "_C" '(85.72 0) '(48.37 51.92) '(48.37 -51.92)) ; 5th arc&lt;BR /&gt;(ssadd (entlast) ss) ; add to selection set&lt;BR /&gt;(command "_arc" "_C" '(65.96 0) '(37.45 54.89) '(37.45 -54.98)) ; 6th arc&lt;BR /&gt;(ssadd (entlast) ss) ; add to selection set&lt;BR /&gt;(command "_arc" "_C" '(40.25 0) '(23.8 50.74) '(23.8 -50.74)) ; 7th arc&lt;BR /&gt;(ssadd (entlast) ss) ; add to selection set&lt;BR /&gt;(command "_arc" "_C" '(30.45 0) '(14.48 54.88) '(14.48 -54.88)) ; 8th arc&lt;BR /&gt;(ssadd (entlast) ss) ; add to selection set&lt;BR /&gt;(command "_arc" "_C" '(13.11 0) '(-0.41 51.55) '(-0.41 -51.55)) ; 9th arc&lt;BR /&gt;(ssadd (entlast) ss) ; add to selection set&lt;BR /&gt;(command "_arc" "_C" '(0 0) '(-9.34 52.72) '(-9.34 -52.72)) ; 10th arc&lt;BR /&gt;(ssadd (entlast) ss) ; add to selection set&lt;BR /&gt;;;; ... repeat for all arc's&lt;/P&gt;&lt;P&gt;(command "_line" '(98.92 50) '(87.35 56.68) "") ; 1st up line&lt;BR /&gt;(ssadd (entlast) ss)&lt;BR /&gt;(command "_line" '(98.92 -50) '(87.35 -56.68) "") ; 1st down line&lt;BR /&gt;(ssadd (entlast) ss)&lt;BR /&gt;(command "_line" '(87.35 56.68) '(70.55 49.98) "") ; 2nd up line&lt;BR /&gt;(ssadd (entlast) ss)&lt;BR /&gt;(command "_line" '(87.35 -56.68) '(70.55 -49.98) "") ; 2nd down line&lt;BR /&gt;(ssadd (entlast) ss)&lt;BR /&gt;(command "_line" '(70.55 49.98) '(61.24 55.36) "") ; 3rd up line&lt;BR /&gt;(ssadd (entlast) ss)&lt;BR /&gt;(command "_line" '(70.55 -49.98) '(61.24 -55.36) "") ; 3rd down line&lt;BR /&gt;(ssadd (entlast) ss)&lt;BR /&gt;(command "_line" '(61.24 55.36) '(48.37 51.92) "") ; 4th up line&lt;BR /&gt;(ssadd (entlast) ss)&lt;BR /&gt;(command "_line" '(61.24 -55.36) '(48.37 -51.92) "") ; 4th down line&lt;BR /&gt;(ssadd (entlast) ss)&lt;BR /&gt;(command "_line" '(48.37 51.92) '(37.45 54.89) "") ; 5th up line&lt;BR /&gt;(ssadd (entlast) ss)&lt;BR /&gt;(command "_line" '(48.37 -51.92) '(37.45 -54.89) "") ; 5th down line&lt;BR /&gt;(ssadd (entlast) ss)&lt;BR /&gt;(command "_line" '(37.45 54.89) '(23.8 50.74) "") ; 6th up line&lt;BR /&gt;(ssadd (entlast) ss)&lt;BR /&gt;(command "_line" '(37.45 -54.89) '(23.8 -50.74) "") ; 6th down line&lt;BR /&gt;(ssadd (entlast) ss)&lt;BR /&gt;(command "_line" '(23.8 50.74) '(14.48 54.88) "") ; 7th up line&lt;BR /&gt;(ssadd (entlast) ss)&lt;BR /&gt;(command "_line" '(23.8 -50.74) '(14.48 -54.88) "") ; 7th down line&lt;BR /&gt;(ssadd (entlast) ss)&lt;BR /&gt;(command "_line" '(14.48 54.88) '(-0.41 51.55) "") ; 8th up line&lt;BR /&gt;(ssadd (entlast) ss)&lt;BR /&gt;(command "_line" '(14.48 -54.88) '(-0.41 -51.55) "") ; 8th down line&lt;BR /&gt;(ssadd (entlast) ss)&lt;BR /&gt;(command "_line" '(-0.41 51.55) '(-9.34 52.72) "") ; 9th up line&lt;BR /&gt;(ssadd (entlast) ss)&lt;BR /&gt;(command "_line" '(-0.41 -51.55) '(-9.34 -52.72) "") ; 9th down line&lt;BR /&gt;(ssadd (entlast) ss)&lt;BR /&gt;;;; ... repeat for all lines&lt;BR /&gt;;; if complete geometry is drawn, modify it (move, scale, rotate)&lt;BR /&gt;(command "_move" ss "" '(0 0) P0)&lt;BR /&gt;(command "_scale" ss "" p0 sf)&lt;BR /&gt;(command "rotate" ss "" p0 ra)&lt;BR /&gt;(princ)&lt;BR /&gt;)&lt;/P&gt;&lt;P&gt;;; HTH for a beginning&lt;/P&gt;</description>
      <pubDate>Thu, 08 Oct 2020 04:07:14 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/autocad-forum/auto-draw-object/m-p/9790488#M94324</guid>
      <dc:creator>aliff_ahtenk</dc:creator>
      <dc:date>2020-10-08T04:07:14Z</dc:date>
    </item>
    <item>
      <title>Re: Auto draw object</title>
      <link>https://forums.autodesk.com/t5/autocad-forum/auto-draw-object/m-p/9790764#M94325</link>
      <description>&lt;BLOCKQUOTE&gt;&lt;HR /&gt;&lt;a href="https://forums.autodesk.com/t5/user/viewprofilepage/user-id/7963331"&gt;@aliff_ahtenk&lt;/a&gt;&amp;nbsp;wrote:&lt;BR /&gt;
&lt;P&gt;...&amp;nbsp; it does not work on the scale..&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;HR /&gt;&lt;/BLOCKQUOTE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;While the lisp is running the OSNAP must not be ON.&lt;/P&gt;
&lt;P&gt;Either you disable it manually (F3) (and do never forgot it before each starting the LISP) or you add a line in the code to set the system variable OSNAPCOORD to 1. (I guess you have it set to 2).&lt;/P&gt;
&lt;P&gt;The scaling works well for me. &lt;A href="https://autode.sk/34DFf4m" target="_blank" rel="noopener"&gt;&amp;gt;&amp;gt;video&amp;lt;&amp;lt; &lt;/A&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;The next steps will be (a rough draft):&lt;/P&gt;
&lt;P&gt;The moving, scaling and rotating should be removed in the code above. We will do it later (while inserting the block).&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;- Create a block name string using &lt;EM&gt;(strcat (FD (rtos sf))&lt;/EM&gt;&lt;/P&gt;
&lt;P&gt;- Test if this block name already exists.&amp;nbsp; If yes, erase the selection set ss and skip the next step.&lt;/P&gt;
&lt;P&gt;- create a new block definition&lt;/P&gt;
&lt;P&gt;&amp;nbsp; * Basepoint: will be &lt;EM&gt;P0&lt;/EM&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp; * objects: will be the selection set &lt;EM&gt;ss&lt;/EM&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp; * Blockname: use the name defined above&lt;BR /&gt;- insert the block at P0.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Try it.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;BTW: This strategy is not very well, because with each using of this lisp will first drawn exactly the same objects. &lt;a href="https://forums.autodesk.com/t5/user/viewprofilepage/user-id/69526"&gt;@Kent1Cooper&lt;/a&gt;'s hints above pointed in a better direction.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 08 Oct 2020 07:59:13 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/autocad-forum/auto-draw-object/m-p/9790764#M94325</guid>
      <dc:creator>j.palmeL29YX</dc:creator>
      <dc:date>2020-10-08T07:59:13Z</dc:date>
    </item>
    <item>
      <title>Re: Auto draw object</title>
      <link>https://forums.autodesk.com/t5/autocad-forum/auto-draw-object/m-p/9791873#M94326</link>
      <description>&lt;P&gt;A necessary correction (sorry for the mistake):&lt;/P&gt;
&lt;P&gt;For creating the new blockname use&lt;/P&gt;
&lt;P&gt;(strcat "FD" (rtos sf))&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;My suggestion above &lt;EM&gt;(strcat (FD (rtos sf)) &lt;/EM&gt;is wrong (typing error in the hurry)&lt;EM&gt;.&lt;/EM&gt;&lt;/P&gt;
&lt;P&gt;My apologies.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 08 Oct 2020 16:04:03 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/autocad-forum/auto-draw-object/m-p/9791873#M94326</guid>
      <dc:creator>j.palmeL29YX</dc:creator>
      <dc:date>2020-10-08T16:04:03Z</dc:date>
    </item>
    <item>
      <title>Here Re: Auto draw object</title>
      <link>https://forums.autodesk.com/t5/autocad-forum/auto-draw-object/m-p/9793367#M94327</link>
      <description>&lt;P&gt;Here a suggestion how that can be done:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;LI-CODE lang="general"&gt;(defun c:test (/ P0 SF RA ss bl_name P_ep P_sp P_cp)
  (input)
  (Exist)
  (Insert_block)
  (princ)
)

(defun input (/)  ; ask for input values 
  (setq P0 (getpoint "\nWhere to insert: "))
  (setq SF (getdist "\nScale factor: "))
  (setq RA (getreal "\nRotation angle: "))
)

(defun exist (/)
  (setq bl_name (strcat "FD" (rtos sf))) ; generate Blockname 
  (If (not (tblsearch "block" bl_name))  ; If Blockname NOT yet exists 
; do the following:
    (progn
      (initialize) ; set lists of coordinates for lines and arcs
      (draw)   ; draw the initial geometry
      (command "block" bl_name "0,0" ss "") ; create a new block definition
    )
; If blockname already exists do nothing of that
  )
)


(defun initialize (/)
  (setvar "osnapcoord" 1) ; ignore running OSNAPs
  (setq ss (ssadd)) ; create new selection set
;| the following coordinates were grabbed from your drawing

  (setq	P_ep '((32.6826 184.524 0.0)  ; Endpoints of the arcs
               (1.44315 180.413 0.0)
	       (-50.6704 192.072 0.0)
	       (-84.4138 178.499 0.0)
	       (-131.069 192.099 0.0)
	       (-169.298 181.733 0.0)
	       (-214.355 193.749 0.0)
	       (-246.934 174.939 0.0)
	       (-305.723 198.38 0.0)
	       (-346.218 175.0 0.0)
	      )
  )
  (setq	P_sp '((32.6826 -184.524 0.0)    ; Startpoints of the arcs
	       (1.44315 -180.413 0.0)
	       (-50.6704 -192.072 0.0)
	       (-83.3013 -177.049 0.0)
	       (-131.069 -192.099 0.0)
	       (-169.298 -181.733 0.0)
	       (-214.355 -193.749 0.0)
	       (-246.934 -174.939 0.0)
	       (-305.723 -198.38 0.0)
	       (-346.218 -175.0 0.0)
	      )
  )
  (setq	P_cp '((0.0 0.0 0.0)   ; Centerpoints of the arcs
	       (-45.8702 4.6247e-10 0.0)
	       (-106.56 1.07436e-09 0.0)
	       (-140.876 0.546476 0.0)
	       (-230.844 2.3274e-09 0.0)
	       (-300.022 3.02486e-09 0.0)
	       (-431.674 4.3522e-09 0.0)
	       (-542.545 5.47001e-09 0.0)
	       (-796.52 8.03063e-09 0.0)
	       (-1090.16 1.09912e-08 0.0)
	      )
  )
)

(defun draw (/)
  (setq n 0)
  (repeat 10
    (command "_line" (nth n P_ep) (nth (+ n 1) P_ep) "") ; draw the upper lines
    (ssadd (entlast) ss)
    (setq n (+ n 1))
  )
  (setq n 0)
  (repeat 10
    (command "_line" (nth n P_sp) (nth (+ n 1) P_sp) "") ; draw the lower lines
    (ssadd (entlast) ss)
    (setq n (+ n 1))
  )
  (setq n 0)
  (repeat 10
    (command "_arc" "_C" (nth n P_cp) (nth n P_sp) (nth n P_ep))  ; draw the arcs
    (ssadd (entlast) ss)
    (setq n (+ n 1))
  )
)

(defun insert_block (/)
  (command "insert" bl_name P0 SF "" RA)  ; no comment needed ;-)
)

(princ)&lt;/LI-CODE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;HTH&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;EM&gt;Please mark "Accept as Solution" if my reply resolves the issue or answers your question, to help others in the community.&lt;/EM&gt;&lt;/P&gt;</description>
      <pubDate>Fri, 09 Oct 2020 09:05:01 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/autocad-forum/auto-draw-object/m-p/9793367#M94327</guid>
      <dc:creator>j.palmeL29YX</dc:creator>
      <dc:date>2020-10-09T09:05:01Z</dc:date>
    </item>
  </channel>
</rss>

