Jump to content

Search the Community

Showing results for tags 'hi' or ' all'.

  • Search By Tags

    Type tags separated by commas.
  • Search By Author

Content Type


Forums

  • CADTutor
    • News, Announcements & FAQ
    • Feedback
  • AutoCAD
    • AutoCAD Beginners' Area
    • AutoCAD 2D Drafting, Object Properties & Interface
    • AutoCAD Drawing Management & Output
    • AutoCAD 3D Modelling & Rendering
    • AutoCAD Vertical Products
    • AutoCAD LT
    • CAD Management
    • AutoCAD Bugs, Error Messages & Quirks
    • AutoCAD General
    • AutoCAD Blogs
  • AutoCAD Customization
    • The CUI, Hatches, Linetypes, Scripts & Macros
    • AutoLISP, Visual LISP & DCL
    • .NET, ObjectARX & VBA
    • Application Beta Testing
    • Application Archive
  • Other Autodesk Products
    • Autodesk 3ds Max
    • Autodesk Revit
    • Autodesk Inventor
    • Autodesk Software General
  • Other CAD Products
    • BricsCAD
    • SketchUp
    • Rhino
    • SolidWorks
    • MicroStation
    • Design Software
    • Catch All
  • Resources
    • Tutorials & Tips'n'Tricks
    • AutoCAD Museum
    • Blocks, Images, Models & Materials
    • Useful Links
  • Community
    • Introduce Yourself
    • Showcase
    • Work In Progress
    • Jobs & Training
    • Chat
    • Competitions

Categories

  • Programs and Scripts
  • 2D AutoCAD Blocks
  • 3D AutoCAD Blocks
  • Images
    • Backgrounds

Find results in...

Find results that contain...


Date Created

  • Start

    End


Last Updated

  • Start

    End


Filter by number of...

Found 1 result

  1. Hi, all I need ur help. I found code in internet to draw polyline between blocks as attachment but not working properly, can any one adjust the code thanks for cooperation (defun c:connect (/ ss i e plist p nextpt plist-sorted rtn pp) (while (or (prompt "\nSelect blocks or circles...") (not (setq ss (ssget '((0 . "INSERT,CIRCLE"))))) ) (prompt "\nEmpty sel. set...") ) (repeat (setq i (sslength ss)) (setq e (ssname ss (setq i (1- i)))) (setq plist (cons (cdr (assoc 10 (entget e))) plist)) ) (setq p (getpoint "\nPick or specify start point - use osnap cen or ins : " ) ) (defun nextpt (p plist / car-sort pp) (defun car-sort (l f / removenth r k) (defun removenth (l n / k) (setq k -1) (vl-remove-if '(lambda (x) (= (setq k (1+ k)) n)) l) ) (setq k -1) (vl-some '(lambda (a) (setq k (1+ k)) (if (vl-every '(lambda (x) (apply f (list a x))) (removenth l k) ) (setq r a) ) ) l ) r ) (setq plist (vl-remove-if '(lambda (x) (equal x p 1e-3)) plist)) (setq pp (car-sort plist '(lambda (a b) (<= (distance p a) (distance p b))) ) ) (list pp plist) ) (if p (progn (while (cadr plist) (setq plist-sorted (cons p plist-sorted)) (setq rtn (nextpt p plist)) (setq pp (car rtn) plist (cadr rtn) ) (setq p pp) ) (setq plist-sorted (cons (car plist) plist-sorted)) (setq plist-sorted (reverse plist-sorted)) (entmake (append (list '(0 . "LWPOLYLINE") '(100 . "AcDbEntity") '(100 . "AcDbPolyline") (cons 90 (length plist-sorted)) (cons 70 (if (= 1 (getvar 'plinegen)) 128 0 ) ) '(38 . 0.0) ) (mapcar '(lambda (p) (cons 10 p)) plist-sorted) (list '(210 0.0 0.0 1.0)) ) ) ) ) (princ) ) Power wiring.dwg
×
×
  • Create New...