<?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: Python Code to extrude a circle to a separate circle that is offset of the first circle. in Visual LISP, AutoLISP and General Customization Forum</title>
    <link>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/python-code-to-extrude-a-circle-to-a-separate-circle-that-is/m-p/13672333#M164564</link>
    <description>&lt;P&gt;Give this a try and use the csv provided as it has radius set. Else set radius to a fixed value in csv.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="general"&gt;; https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/python-code-to-extrude-a-circle-to-a-separate-circle-that-is/td-p/13667896
; drawtubes by AlanH June 2025
; reads two xyz points and radius in a csv file

; thanks to Lee-mac for this defun
(defun C:dotubes ( / oldsnap oldaunits csv fo str x1 x2 y1 y2 z1 z2 rad)
(defun csv-&amp;gt;lst (str del / pos )
(if (setq pos (vl-string-position del str))
    (cons (substr str 1 pos) (csv-&amp;gt;lst (substr str (+ pos 2)) del))
    (list str)
    )
)

(defun tube (ent rad / obj start end len)
(setq obj (vlax-ename-&amp;gt;vla-object ent))
(setq start (vlax-curve-getstartPoint obj))
(setq end (vlax-curve-getEndPoint obj))
(setq len (vlax-get obj 'length))
(command "UCS" "3" start end "")
(command "circle" "0,0,0" rad)
(setq ent2 (entlast))
(command "rotate3d" ent2 "" "Y" "0,0,0" (/ pi 2.))
(command "extrude" ent2 "" len)
(command "UCS" "W")
(princ)
)

;;starts here

(setq oldsnap (getvar 'osmode))
(setvar 'osmode 0)
(setq oldaunits (getvar 'aunits))
(setvar 'aunits 3)

(setq csv (getfiled "Select CSV File" "" "csv" 16))
(setq fo (open csv "R"))
(setq str (read-line fo))

(while (setq str (read-line fo))
  (setq lst (csv-&amp;gt;lst str 44))
  (setq x1 (atof (nth 1 lst)) y1 (atof (nth 2 lst))  z1 (atof (nth 3 lst)) rad (atof (nth 4 lst)))
  (setq str (read-line fo))
  (setq lst (csv-&amp;gt;lst str 44))
  (setq x2 (atof (nth 1 lst)) y2 (atof (nth 2 lst)) z2 (atof (nth 3 lst)))
  (command "line" (list x1 y1 z1)(list x2 y2 z2) "")
  (tube (entlast) rad)
)

(CLOSE FO)
(command "zoom" "e")
(setvar 'aunits oldaunits)
(setvar 'osmode oldsnap)
(princ)
)
(c:dotubes)&lt;/LI-CODE&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="SeaHaven_0-1749455517347.png" style="width: 400px;"&gt;&lt;img src="https://forums.autodesk.com/t5/image/serverpage/image-id/1541648iFD08555D79664E40/image-size/medium?v=v2&amp;amp;px=400" role="button" title="SeaHaven_0-1749455517347.png" alt="SeaHaven_0-1749455517347.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Mon, 09 Jun 2025 11:04:19 GMT</pubDate>
    <dc:creator>Sea-Haven</dc:creator>
    <dc:date>2025-06-09T11:04:19Z</dc:date>
    <item>
      <title>Python Code to extrude a circle to a separate circle that is offset of the first circle.</title>
      <link>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/python-code-to-extrude-a-circle-to-a-separate-circle-that-is/m-p/13667896#M164506</link>
      <description>&lt;P&gt;Good morning, everyone!&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Is there a way to extrude or loft 1 circle to another circle to create a solid cylinder where the circles are drawn on the xz plane but are not directly inline with one another. Circle 1 lets say is at 10, 0 , 0 and Circle 2 is at 15, 20, 0.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Does pyautocad have a function that will perform this extrusion?&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I have thought about maybe creating a point in the center of the circles and then creating a line between the two circles as a rail for the extrusion to follow. Would I even need to go that far?&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thank you all for your time!&lt;/P&gt;</description>
      <pubDate>Thu, 05 Jun 2025 14:09:42 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/python-code-to-extrude-a-circle-to-a-separate-circle-that-is/m-p/13667896#M164506</guid>
      <dc:creator>sjelen</dc:creator>
      <dc:date>2025-06-05T14:09:42Z</dc:date>
    </item>
    <item>
      <title>Re: Python Code to extrude a circle to a separate circle that is offset of the first circle.</title>
      <link>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/python-code-to-extrude-a-circle-to-a-separate-circle-that-is/m-p/13668205#M164511</link>
      <description>&lt;P&gt;I may not understand correctly, but it sounds like a job for ordinary LOFT.&amp;nbsp; If that doesn't do what you want, please explain in detail, and post a small drawing with Circles in the kind of relationship you have.&lt;/P&gt;</description>
      <pubDate>Thu, 05 Jun 2025 16:55:42 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/python-code-to-extrude-a-circle-to-a-separate-circle-that-is/m-p/13668205#M164511</guid>
      <dc:creator>Kent1Cooper</dc:creator>
      <dc:date>2025-06-05T16:55:42Z</dc:date>
    </item>
    <item>
      <title>Re: Python Code to extrude a circle to a separate circle that is offset of the first circle.</title>
      <link>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/python-code-to-extrude-a-circle-to-a-separate-circle-that-is/m-p/13668211#M164512</link>
      <description>&lt;P&gt;Hey Kent, thanks for responding. What's the proper syntax for lofting using pyautocad? Is there one? I cannot get it to work.&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 05 Jun 2025 16:59:40 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/python-code-to-extrude-a-circle-to-a-separate-circle-that-is/m-p/13668211#M164512</guid>
      <dc:creator>sjelen</dc:creator>
      <dc:date>2025-06-05T16:59:40Z</dc:date>
    </item>
    <item>
      <title>Re: Python Code to extrude a circle to a separate circle that is offset of the first circle.</title>
      <link>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/python-code-to-extrude-a-circle-to-a-separate-circle-that-is/m-p/13668235#M164513</link>
      <description>&lt;P&gt;[Sorry, but I don't know pyautocad.&amp;nbsp; I don't see a Forum about it in the Autodesk world, but could there be one in the Python world?]&lt;/P&gt;</description>
      <pubDate>Thu, 05 Jun 2025 17:10:02 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/python-code-to-extrude-a-circle-to-a-separate-circle-that-is/m-p/13668235#M164513</guid>
      <dc:creator>Kent1Cooper</dc:creator>
      <dc:date>2025-06-05T17:10:02Z</dc:date>
    </item>
    <item>
      <title>Re: Python Code to extrude a circle to a separate circle that is offset of the first circle.</title>
      <link>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/python-code-to-extrude-a-circle-to-a-separate-circle-that-is/m-p/13668241#M164514</link>
      <description>&lt;P&gt;There is a dedicated Python section over at &lt;A href="https://www.theswamp.org/index.php?board=76.0" target="_blank" rel="noopener"&gt;theswamp.org&lt;/A&gt;.&lt;/P&gt;</description>
      <pubDate>Thu, 05 Jun 2025 17:14:06 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/python-code-to-extrude-a-circle-to-a-separate-circle-that-is/m-p/13668241#M164514</guid>
      <dc:creator>DGCSCAD</dc:creator>
      <dc:date>2025-06-05T17:14:06Z</dc:date>
    </item>
    <item>
      <title>Re: Python Code to extrude a circle to a separate circle that is offset of the first circle.</title>
      <link>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/python-code-to-extrude-a-circle-to-a-separate-circle-that-is/m-p/13668266#M164516</link>
      <description>&lt;P&gt;Great, thank you! I'll check that out.&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 05 Jun 2025 17:30:16 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/python-code-to-extrude-a-circle-to-a-separate-circle-that-is/m-p/13668266#M164516</guid>
      <dc:creator>sjelen</dc:creator>
      <dc:date>2025-06-05T17:30:16Z</dc:date>
    </item>
    <item>
      <title>Re: Python Code to extrude a circle to a separate circle that is offset of the first circle.</title>
      <link>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/python-code-to-extrude-a-circle-to-a-separate-circle-that-is/m-p/13668274#M164518</link>
      <description>&lt;P&gt;No problem, thanks Kent. Do you think I could do the same process with the AutoLisp language? I tried but could not figure out how to make it more automated. When I would run the code, it would ask me to choose the circles and the line, which defeated the purpose of trying to save time and have it automatically create the loft.&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 05 Jun 2025 17:34:08 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/python-code-to-extrude-a-circle-to-a-separate-circle-that-is/m-p/13668274#M164518</guid>
      <dc:creator>sjelen</dc:creator>
      <dc:date>2025-06-05T17:34:08Z</dc:date>
    </item>
    <item>
      <title>Re: Python Code to extrude a circle to a separate circle that is offset of the first circle.</title>
      <link>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/python-code-to-extrude-a-circle-to-a-separate-circle-that-is/m-p/13668729#M164525</link>
      <description>&lt;BLOCKQUOTE&gt;&lt;HR /&gt;&lt;a href="https://forums.autodesk.com/t5/user/viewprofilepage/user-id/12551837"&gt;@sjelen&lt;/a&gt;&amp;nbsp;wrote:&lt;BR /&gt;
&lt;P&gt;.... Do you think I could do the same process with the AutoLisp language? ....&amp;nbsp;&lt;/P&gt;
&lt;HR /&gt;&lt;/BLOCKQUOTE&gt;
&lt;P&gt;Surely that's possible, and it should not require your center points or line -- just selection of the two Circles.&amp;nbsp; Can you post a sample drawing?&lt;/P&gt;</description>
      <pubDate>Thu, 05 Jun 2025 23:58:27 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/python-code-to-extrude-a-circle-to-a-separate-circle-that-is/m-p/13668729#M164525</guid>
      <dc:creator>Kent1Cooper</dc:creator>
      <dc:date>2025-06-05T23:58:27Z</dc:date>
    </item>
    <item>
      <title>Re: Python Code to extrude a circle to a separate circle that is offset of the first circle.</title>
      <link>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/python-code-to-extrude-a-circle-to-a-separate-circle-that-is/m-p/13668752#M164529</link>
      <description>&lt;P&gt;This is just using Extrude and Subtract is it that what your looking for done manually but could be a lisp.&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="SeaHaven_0-1749169758696.png" style="width: 400px;"&gt;&lt;img src="https://forums.autodesk.com/t5/image/serverpage/image-id/1540849i73FA125BB8F3A48E/image-size/medium?v=v2&amp;amp;px=400" role="button" title="SeaHaven_0-1749169758696.png" alt="SeaHaven_0-1749169758696.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 06 Jun 2025 00:29:42 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/python-code-to-extrude-a-circle-to-a-separate-circle-that-is/m-p/13668752#M164529</guid>
      <dc:creator>Sea-Haven</dc:creator>
      <dc:date>2025-06-06T00:29:42Z</dc:date>
    </item>
    <item>
      <title>Re: Python Code to extrude a circle to a separate circle that is offset of the first circle.</title>
      <link>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/python-code-to-extrude-a-circle-to-a-separate-circle-that-is/m-p/13668772#M164530</link>
      <description>&lt;P&gt;For pyautocad or com, you can usually search and follow along what’s in the VBA docs. For PyRx you can ask at the swamp or in the github discussions. For PyRx, you can usually get what you need from VBA, .NET or ARX documentation&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Here’s a sample in PyRx. Note: in pyautocad, you don’t have geometry classes, but you may be able to use numpy to compute vectors&lt;/P&gt;&lt;LI-CODE lang="python"&gt;import traceback
from pyrx import Ap, Ax, Ge


@Ap.Command()
def xdoit() -&amp;gt; None:
    try:
        axApp = Ap.Application.acadApplication()
        axDoc = axApp.activeDocument()
        axModel = axDoc.modelSpace()

        # maybe use numpy to compute the vector
        direction = Ge.Point3d(15, 20, 0) - Ge.Point3d(10, 0, 0)

        # create the circle
        circle = axModel.addCircle(Ge.Point3d(10, 0, 0), 5)

        # set the normal to the extrution direction
        circle.setNormal(direction)

        # create a region to extrude
        regions = axModel.addRegion([circle])

        solid = axModel.addExtrudedSolid(regions[0], direction.length(), 0.0)

        circle.erase()

    except Exception as err:
        traceback.print_exception(err)&lt;/LI-CODE&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="extrude.png" style="width: 400px;"&gt;&lt;img src="https://forums.autodesk.com/t5/image/serverpage/image-id/1540851i0B98943E6789CC96/image-size/medium?v=v2&amp;amp;px=400" role="button" title="extrude.png" alt="extrude.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt; &lt;/P&gt;</description>
      <pubDate>Fri, 06 Jun 2025 00:49:44 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/python-code-to-extrude-a-circle-to-a-separate-circle-that-is/m-p/13668772#M164530</guid>
      <dc:creator>daniel_cadext</dc:creator>
      <dc:date>2025-06-06T00:49:44Z</dc:date>
    </item>
    <item>
      <title>Re: Python Code to extrude a circle to a separate circle that is offset of the first circle.</title>
      <link>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/python-code-to-extrude-a-circle-to-a-separate-circle-that-is/m-p/13669987#M164539</link>
      <description>&lt;P&gt;This is what I'm going for. I have a CSV file of points that I would like to eventually draw circles at the points and then loft the circles from the points that coincide with one another.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Lofting pic1.png" style="width: 999px;"&gt;&lt;img src="https://forums.autodesk.com/t5/image/serverpage/image-id/1541182i3525135F3F4CE29F/image-size/large?v=v2&amp;amp;px=999" role="button" title="Lofting pic1.png" alt="Lofting pic1.png" /&gt;&lt;/span&gt;&lt;/P&gt;</description>
      <pubDate>Fri, 06 Jun 2025 16:34:14 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/python-code-to-extrude-a-circle-to-a-separate-circle-that-is/m-p/13669987#M164539</guid>
      <dc:creator>sjelen</dc:creator>
      <dc:date>2025-06-06T16:34:14Z</dc:date>
    </item>
    <item>
      <title>Re: Python Code to extrude a circle to a separate circle that is offset of the first circle.</title>
      <link>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/python-code-to-extrude-a-circle-to-a-separate-circle-that-is/m-p/13670023#M164541</link>
      <description>&lt;P&gt;AutoLisp can do that, this way for those values [in simplest terms]:&lt;/P&gt;
&lt;LI-CODE lang="general"&gt;(defun C:TEST (/ c1)
  (command "_.circle" '(0 0 0) 1)
  (setq c1 (entlast))
  (command
    "_.circle" '(3 1 -30) 1
    "_.loft" c1 (entlast) "" ""
  ); command
  (prin1)
)&lt;/LI-CODE&gt;
&lt;P&gt;Instead of having the values built in, it would presumably need to include the opening of your CSV file, and reading of centers and radii from there to use in the commands, and closing of the file.&amp;nbsp; If you have a sample file, the command can be adjusted to accommodate the format of the information.&amp;nbsp; [Just one pair of locations per file, or multiples?&amp;nbsp; How exactly are the coordinates expressed in the text content?&amp;nbsp; Is there anything like a header line to bypass?&amp;nbsp; Is perhaps the radius always the same with only the locations in the file?&amp;nbsp; Etc.]&lt;/P&gt;</description>
      <pubDate>Fri, 06 Jun 2025 17:01:39 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/python-code-to-extrude-a-circle-to-a-separate-circle-that-is/m-p/13670023#M164541</guid>
      <dc:creator>Kent1Cooper</dc:creator>
      <dc:date>2025-06-06T17:01:39Z</dc:date>
    </item>
    <item>
      <title>Re: Python Code to extrude a circle to a separate circle that is offset of the first circle.</title>
      <link>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/python-code-to-extrude-a-circle-to-a-separate-circle-that-is/m-p/13670112#M164542</link>
      <description>&lt;P&gt;The CSV file comes from the total station lay out from the field engineer.&amp;nbsp;&lt;/P&gt;&lt;P&gt;point number - y - x - z and have a coordinate for each plane and the point number we set on the total station.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;The code would just reference the CSV and not be implemented in the code?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;No, the CSV file would have hundreds of points, but each point would have a "pair" and that's where the circles and lofting would occur. Yes, all the circles will be the same radius.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I've attached a test CSV file of what it would be like. the .1 would be the partner point. ex. 100 and 100.1 would be together. We can always change the point name if needed. Also apologies I thought I recalled it being xyz and instead it is yxz.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 06 Jun 2025 18:11:57 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/python-code-to-extrude-a-circle-to-a-separate-circle-that-is/m-p/13670112#M164542</guid>
      <dc:creator>sjelen</dc:creator>
      <dc:date>2025-06-06T18:11:57Z</dc:date>
    </item>
    <item>
      <title>Re: Python Code to extrude a circle to a separate circle that is offset of the first circle.</title>
      <link>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/python-code-to-extrude-a-circle-to-a-separate-circle-that-is/m-p/13670451#M164545</link>
      <description>&lt;P&gt;maybe something like this?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="python"&gt;from pyrx import Ap, Db, Ge, Db, Ap, Ed, Ax, command
import csv

@command
def doit():
    axApp = Ap.Application.acadApplication()
    axDoc = axApp.activeDocument()
    axModel = axDoc.modelSpace()
    
    #read the points
    pnts = []
    with open("e:\\temp\\APL-Export.csv", "r") as f:
        for i, line in enumerate(csv.reader(f, delimiter=",")):
            if i == 0:
                continue
            pnts.append(Ge.Point3d(float(line[2]), float(line[1]), float(line[3])))
            
    if len(pnts) &amp;lt; 2:
        return
    
    # start direction
    direction = pnts[1] - pnts[0] 
    circle = axModel.addCircle(pnts[0], 1)
    circle.setNormal(direction)
    regions = axModel.addRegion([circle])
    
    #create a path
    path = axModel.add3DPoly(pnts)
    solid = axModel.addExtrudedSolidAlongPath(regions[0], path)&lt;/LI-CODE&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="extrude2.png" style="width: 400px;"&gt;&lt;img src="https://forums.autodesk.com/t5/image/serverpage/image-id/1541269i0D12335C4999523A/image-size/medium?v=v2&amp;amp;px=400" role="button" title="extrude2.png" alt="extrude2.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt; &lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Sat, 07 Jun 2025 00:07:57 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/python-code-to-extrude-a-circle-to-a-separate-circle-that-is/m-p/13670451#M164545</guid>
      <dc:creator>daniel_cadext</dc:creator>
      <dc:date>2025-06-07T00:07:57Z</dc:date>
    </item>
    <item>
      <title>Re: Python Code to extrude a circle to a separate circle that is offset of the first circle.</title>
      <link>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/python-code-to-extrude-a-circle-to-a-separate-circle-that-is/m-p/13670500#M164546</link>
      <description>&lt;P&gt;There is no reason why the description could not be a pipe diameter, if blank use a default value, also with descriptions can have a look up function and draw on correct layer.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Back to task&amp;nbsp; I am not sure that using loft draws the correct object, I may be wrong don't play with 3dsolids enough, if you have an inclined pipe ie different xyz then the circle needs to be draw at 90 to the line direction, ie at an angle when viewed in plan, then using extrude and path or a UCS with height option and&amp;nbsp; will draw correct pipe between 2 Z's. Now where is that 3dline angle stuff.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;The left image is a loft of 2 circles the right is a circle rotated to match line direction. Note thickness also.&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="SeaHaven_0-1749261795554.png" style="width: 400px;"&gt;&lt;img src="https://forums.autodesk.com/t5/image/serverpage/image-id/1541277i0C84674BC252CB33/image-size/medium?v=v2&amp;amp;px=400" role="button" title="SeaHaven_0-1749261795554.png" alt="SeaHaven_0-1749261795554.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Sat, 07 Jun 2025 02:04:19 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/python-code-to-extrude-a-circle-to-a-separate-circle-that-is/m-p/13670500#M164546</guid>
      <dc:creator>Sea-Haven</dc:creator>
      <dc:date>2025-06-07T02:04:19Z</dc:date>
    </item>
    <item>
      <title>Re: Python Code to extrude a circle to a separate circle that is offset of the first circle.</title>
      <link>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/python-code-to-extrude-a-circle-to-a-separate-circle-that-is/m-p/13670514#M164547</link>
      <description>&lt;P&gt;Hey Daniel, thanks for this. I like where you’re going but I would not want them all connected like that. Each pair would be an individual cylinder.&amp;nbsp;&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;&lt;P&gt;I believe you mentioned in a different conversation that this is written in C++?&amp;nbsp;&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;&lt;P&gt;Would you be able to guide me to a site or two where I can better understand that information. I am fairly new to python but I don’t know anything about C++ and have dabbled in AutoLisp for a different project.&lt;/P&gt;&lt;P&gt;Thank you!&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Sat, 07 Jun 2025 02:34:42 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/python-code-to-extrude-a-circle-to-a-separate-circle-that-is/m-p/13670514#M164547</guid>
      <dc:creator>sjelen</dc:creator>
      <dc:date>2025-06-07T02:34:42Z</dc:date>
    </item>
    <item>
      <title>Re: Python Code to extrude a circle to a separate circle that is offset of the first circle.</title>
      <link>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/python-code-to-extrude-a-circle-to-a-separate-circle-that-is/m-p/13670518#M164548</link>
      <description>&lt;P&gt;Hey Sea-Haven, thanks for looking into this for me. Am I understanding correctly that you’re saying in the description portion of the CSV I could add a comment to where the code would perform the function that way?&amp;nbsp;&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;&lt;P&gt;ok over to your other point about the circles not being 90 degrees to the line it’s following. That is ok for me. I’m not as concerned with the ends as I am the cylinder shape itself. That’s where I thought loft worked for my scenario as when I use loft in Fusion it makes the solid from 2 points regardless of the orientation, or adding a “rail” will make it follow that path. What’s critical for me will be a consistent cylinder size.&amp;nbsp;&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;&lt;P&gt;if it helps I’m trying to use this to replicate rebar in a concrete slab. Once I figure out the cylinders in one direction I’ll want to create another set perpendicular to the first set, replicating top bar and bottom bar.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;thank you again for your help!&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Sat, 07 Jun 2025 02:47:32 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/python-code-to-extrude-a-circle-to-a-separate-circle-that-is/m-p/13670518#M164548</guid>
      <dc:creator>sjelen</dc:creator>
      <dc:date>2025-06-07T02:47:32Z</dc:date>
    </item>
    <item>
      <title>Re: Python Code to extrude a circle to a separate circle that is offset of the first circle.</title>
      <link>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/python-code-to-extrude-a-circle-to-a-separate-circle-that-is/m-p/13670644#M164550</link>
      <description>&lt;P&gt;" Each pair would be an individual cylinder"&lt;/P&gt;&lt;P&gt;You can use the same algorithm and split the data up to pairs.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;" written in C++?"&lt;/P&gt;&lt;P&gt;Don’t worry about the C++ stuff, I was just trying to explain the difference between pyautocad and pyrx, the interfaces from a scripter’s perspective are both python&lt;/P&gt;&lt;P&gt;you might try both and see which is more comfortable to program in&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;The link to the project is in my signature, there’s discussions and samples, and there’s also more samples over at the swamp&lt;/P&gt;&lt;P&gt;~Dan&lt;/P&gt;</description>
      <pubDate>Sat, 07 Jun 2025 07:02:52 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/python-code-to-extrude-a-circle-to-a-separate-circle-that-is/m-p/13670644#M164550</guid>
      <dc:creator>daniel_cadext</dc:creator>
      <dc:date>2025-06-07T07:02:52Z</dc:date>
    </item>
    <item>
      <title>Re: Python Code to extrude a circle to a separate circle that is offset of the first circle.</title>
      <link>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/python-code-to-extrude-a-circle-to-a-separate-circle-that-is/m-p/13672333#M164564</link>
      <description>&lt;P&gt;Give this a try and use the csv provided as it has radius set. Else set radius to a fixed value in csv.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="general"&gt;; https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/python-code-to-extrude-a-circle-to-a-separate-circle-that-is/td-p/13667896
; drawtubes by AlanH June 2025
; reads two xyz points and radius in a csv file

; thanks to Lee-mac for this defun
(defun C:dotubes ( / oldsnap oldaunits csv fo str x1 x2 y1 y2 z1 z2 rad)
(defun csv-&amp;gt;lst (str del / pos )
(if (setq pos (vl-string-position del str))
    (cons (substr str 1 pos) (csv-&amp;gt;lst (substr str (+ pos 2)) del))
    (list str)
    )
)

(defun tube (ent rad / obj start end len)
(setq obj (vlax-ename-&amp;gt;vla-object ent))
(setq start (vlax-curve-getstartPoint obj))
(setq end (vlax-curve-getEndPoint obj))
(setq len (vlax-get obj 'length))
(command "UCS" "3" start end "")
(command "circle" "0,0,0" rad)
(setq ent2 (entlast))
(command "rotate3d" ent2 "" "Y" "0,0,0" (/ pi 2.))
(command "extrude" ent2 "" len)
(command "UCS" "W")
(princ)
)

;;starts here

(setq oldsnap (getvar 'osmode))
(setvar 'osmode 0)
(setq oldaunits (getvar 'aunits))
(setvar 'aunits 3)

(setq csv (getfiled "Select CSV File" "" "csv" 16))
(setq fo (open csv "R"))
(setq str (read-line fo))

(while (setq str (read-line fo))
  (setq lst (csv-&amp;gt;lst str 44))
  (setq x1 (atof (nth 1 lst)) y1 (atof (nth 2 lst))  z1 (atof (nth 3 lst)) rad (atof (nth 4 lst)))
  (setq str (read-line fo))
  (setq lst (csv-&amp;gt;lst str 44))
  (setq x2 (atof (nth 1 lst)) y2 (atof (nth 2 lst)) z2 (atof (nth 3 lst)))
  (command "line" (list x1 y1 z1)(list x2 y2 z2) "")
  (tube (entlast) rad)
)

(CLOSE FO)
(command "zoom" "e")
(setvar 'aunits oldaunits)
(setvar 'osmode oldsnap)
(princ)
)
(c:dotubes)&lt;/LI-CODE&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="SeaHaven_0-1749455517347.png" style="width: 400px;"&gt;&lt;img src="https://forums.autodesk.com/t5/image/serverpage/image-id/1541648iFD08555D79664E40/image-size/medium?v=v2&amp;amp;px=400" role="button" title="SeaHaven_0-1749455517347.png" alt="SeaHaven_0-1749455517347.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 09 Jun 2025 11:04:19 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/python-code-to-extrude-a-circle-to-a-separate-circle-that-is/m-p/13672333#M164564</guid>
      <dc:creator>Sea-Haven</dc:creator>
      <dc:date>2025-06-09T11:04:19Z</dc:date>
    </item>
    <item>
      <title>Re: Python Code to extrude a circle to a separate circle that is offset of the first circle.</title>
      <link>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/python-code-to-extrude-a-circle-to-a-separate-circle-that-is/m-p/13677224#M164620</link>
      <description>&lt;P&gt;DANG! That worked really nice! Thank you Lee-Mac and Alan!&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I do like how using the description can be used to dictate the diameter of the cylinder. If it's rebar or PT we could specify a different diameter that way in the description so that's great!&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I'm having a hard time rotating the plane so that the elements are drawn and extruded along the XZ plane and not the XY plane. I'd like to draw the circles on the XZ and extrude along the XY plane. I thought I could change the USC you have but that isn't working.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;This is really coming together though! Really exciting!&lt;/P&gt;&lt;P&gt;Thank you again!&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="sjelen_0-1749664011618.png" style="width: 400px;"&gt;&lt;img src="https://forums.autodesk.com/t5/image/serverpage/image-id/1542645i9D0F2918EC0E53AE/image-size/medium?v=v2&amp;amp;px=400" role="button" title="sjelen_0-1749664011618.png" alt="sjelen_0-1749664011618.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 11 Jun 2025 17:48:00 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/python-code-to-extrude-a-circle-to-a-separate-circle-that-is/m-p/13677224#M164620</guid>
      <dc:creator>sjelen</dc:creator>
      <dc:date>2025-06-11T17:48:00Z</dc:date>
    </item>
  </channel>
</rss>

