+ Reply to Thread
Page 3 of 3 FirstFirst 1 2 3
Results 21 to 22 of 22
  1. #21
    Senior Member viviancarvalho's Avatar
    Using
    AutoCAD 2010
    Join Date
    Oct 2009
    Location
    Bahrain
    Posts
    119

    Default

    Registered forum members do not see this ad.

    Hi Kev
    Thats for you. Let me know if it worked out for you or not. Coz i ve done it in a bit hurry.

    ;FLEXIBLE DUCTS english
    (defun c:fd2(/ ce osm clyr fr cin c1 c2 c3 c4 c5 c6 c7 cl fb fdia bn terr)
    (princ "\n Made easy for you by Vivian")
    (setq ce(getvar "cmdecho")
    osm(getvar "osmode")
    clyr(getvar "clayer")
    fr(getvar "filletrad"))
    (setq terr *error*)
    (setq *error* SAD_SET)
    (setvar "cmdecho" 0)
    (setvar "osmode" 0)
    (setq cl(car (entsel "\n Select the centre line of flexible : ")))
    (setq fdia(getdist "\n Specify Diameter of the flexible : "))
    (if (> 8 fdia)
    (setvar "filletrad" (mti 100))
    (setvar "filletrad" (mti 200)))
    (if (null (tblsearch "layer" "DUCTING"))
    (command "layer" "n" "DUCTING" "c" "magenta" "DUCTING" "")
    (princ))
    (if (= "LWPOLYLINE" (cdr (assoc 0 (entget cl))))
    (command "fillet" "p" cl)
    (princ))
    (command "change" cl"" "p" "la" "DUCTING" "")
    (setq cin(cdr (assoc 10 (entget cl)))
    c1(polar cin 1.570796 (/ fdia 2))
    c2(polar cin 4.712387 (/ fdia 2))
    c3(polar cin 0.0 (mti 20))
    c4(polar c3 1.570796 (mti 50))
    c5(polar c3 4.712387 (mti 50))
    c6(polar c5 3.141592 (mti 40))
    c7(polar c4 3.141592 (mti 40)))
    (command "pline" c1 c4 c5 c2 c6 c7 "c")
    (setq fb(entlast))
    (command "change" fb"" "p" "la" "DUCTING" "c" "7" "")
    (setq bn (strcat "FLEX"(rtos fdia 2 0)))
    (if (null(tblsearch "block" bn))
    (progn(command "block" bn cin "previous" "")
    (command "measure" cl "b" bn "y" "1.57480315"))
    (progn (command "measure" cl "b" bn "y" "1.57480315")
    (command "erase" fb"")))
    (command "clayer" clyr)
    (command "osmode" osm)
    (command "filletrad" fr)
    (command "cmdecho" ce)
    (princ))
    (defun SAD_SET (ERRORMSG)
    (command nil nil nil)
    (if (not (member ERRORMSG '("console break" "Function Cancelled")))
    (princ (strcat "\nError:" ERRORMSG)))
    (setvar "cmdecho" ce)
    (setvar "osmode" osm)
    (setvar "clayer" clyr)
    (princ "\nAttention! An Error Has Occurred!")
    (princ "\nProgram Now Restoring The User Settings.")
    (terpri)
    (setq *error* terr)
    (princ)
    )
    ;mm to inches
    (defun mti (a)
    (/ a 25.4))

    Regards
    Vivian

  2. #22
    Super Member Tankman's Avatar
    Computer Details
    Tankman's Computer Details
    Operating System:
    XP Pro SP3
    Computer:
    IBM T60 Thinkpadâ„¢
    Monitor:
    36" LCD Monitor/TV, 14" Thinkpadâ„¢ T60
    Using
    AutoCAD 2007
    Join Date
    Mar 2008
    Location
    Eastern PA, USA
    Posts
    1,632

    Default

    If you want to create a new custom linetype, you can use the manual way and edit the respective .LIN file using a text editor - e.g. NOTEPAD (following instructions in the AutoCAD Customization Guide).


    A more convenient way is to make use of the MKLTYPE Express Tool and generate your linetype directly from a pre-drawn drawing (you can use PLINEs, SHAPEs...). For shapes you can use a similar tool - MKSHAPE.
    Express Tools are included in AutoCAD 2004 and higher.
    Tankman

    "When the well is dry, we know the worth of water." Ben Franklin ~ 1746

Similar Threads

  1. Anyone Use Flexible Hose/Tubing?
    By shift1313 in forum Autodesk Inventor
    Replies: 5
    Last Post: 23rd Nov 2009, 01:19 pm
  2. Hose modeling tutorial
    By brasi333 in forum AutoCAD 3D Modelling & Rendering
    Replies: 6
    Last Post: 15th May 2008, 06:38 am
  3. set color & lintype back to bylayer after drawing a line
    By raj banerjee in forum AutoLISP, Visual LISP & DCL
    Replies: 1
    Last Post: 19th Sep 2007, 10:16 am
  4. 3-D Pipework / Flexible Hose
    By AutoCAD Slave in forum AutoCAD Drawing Management & Output
    Replies: 1
    Last Post: 15th Feb 2005, 01:12 pm
  5. Braided Hose?
    By cadet in forum AutoCAD 3D Modelling & Rendering
    Replies: 7
    Last Post: 21st Jan 2005, 07:43 pm

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts