Jump to content

Search the Community

Showing results for tags 'endpoints'.

  • 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 2 results

  1. Hello. I would like to know if there is any lisp that can find and list any polylines with unsnaped endpoints? I have a large file where i have many 2d Polylines in two different layers (AR_RAMAL_LIGACAO_PVC_125 and AR_COLECTOR_PVC_200). Every 2D polyline in layer AR_RAMAL_LIGACAO_PVC_125 must have an endpoint snaped to a 2D Polyline in layer AR_COLECTOR_PVC_200. Attached is a file with a small example of what I mean. Using drawing cleanup to find those fails doesn't work UnsnapedLines.dwg
  2. So dealing with mlines specifically..I was hoping to insert a block specified in the code at the endpoints only.. Lee's been a huge help..actually just today helping me with the following to insert a block on everything but the endpoints, which is perfect for inserting ftgs! This potential code could help us to insert a point load/# of studs (a 4" solid square block) at the end of all beams/hdrs that we draw with mlines. This would be such a big help as I alone go through about 200 of these in a day..that could potentially be completed with 3 clicks..fingers crossed..Any help is appreciated. --------- ;;-----------------=={ Block At Vertices }==------------------;; ;; ;; ;; Inserts a Block at each vertex of selected Polylines, ;; ;; with the exclusion of start/end vertices ;; ;;------------------------------------------------------------;; ;; Author: Lee McDonnell, 2010 ;; ;; ;; ;; Copyright © 2010 by Lee McDonnell, All Rights Reserved. ;; ;; Contact: Lee Mac @ TheSwamp.org, CADTutor.net ;; ;;------------------------------------------------------------;; (defun c:BlockAtVertices ( / *error* _StartUndo _EndUndo _Insert _AngleAtParam doc block ss ) (vl-load-com) ;; © Lee Mac 2010 (setq block "endtick.dwg") ;; << Block Name (defun *error* ( msg ) (and doc (_EndUndo doc)) (or (wcmatch (strcase msg) "*BREAK,*CANCEL*,*EXIT*") (princ (strcat "\n** Error: " msg " **"))) (princ) ) (defun _StartUndo ( doc ) (_EndUndo doc) (vla-StartUndoMark doc) ) (defun _EndUndo ( doc ) (if (= 8 (logand 8 (getvar 'UNDOCTL))) (vla-EndUndoMark doc) ) ) (defun _Insert ( block point rotation ) (entmakex (list (cons 0 "INSERT") (cons 2 block) (cons 10 point) (cons 50 rotation) ) ) ) (defun _AngleatParam ( entity param ) (angle '(0. 0. 0.) (vlax-curve-getFirstDeriv entity param)) ) (setq doc (vla-get-ActiveDocument (vlax-get-acad-object))) (cond ( (= 4 (logand 4 (cdr (assoc 70 (tblsearch "LAYER" (getvar 'CLAYER)))))) (princ "\n** Current Layer Locked **") ) ( (not (or (and (tblsearch "BLOCK" (vl-filename-base block)) (setq block (vl-filename-base block)) ) (and (setq block (findfile (strcat block (if (eq "" (vl-filename-extension block)) ".dwg" "") ) ) ) ( (lambda ( / ocm ) (setq ocm (getvar 'CMDECHO)) (setvar 'CMDECHO 0) (command "_.-insert" block) (command) (setvar 'CMDECHO ocm) (tblsearch "BLOCK" (setq block (vl-filename-base block))) ) ) ) ) ) (princ "\n** Block not Found **") ) ( (not (setq ss (ssget '((0 . "*POLYLINE"))))) (princ "\n*Cancel*") ) (t (_StartUndo doc) ( (lambda ( i / e ) (while (setq e (ssname ss (setq i (1+ i)))) ( (lambda ( param end ) (while (< (setq param (1+ param)) end) (_Insert block (vlax-curve-getPointatParam e param) (_AngleAtParam e param)) ) ) (vlax-curve-getStartParam e) (vlax-curve-getEndParam e) ) ) ) -1 ) (_EndUndo doc) ) ) (princ) ) --------- (These two codes may be from Alanjt though not positive..maybe from a thread he referenced but have since lost that page..sorry!) (defun c:aaa () (vl-load-com) (setq *model-space* (vla-get-modelspace (vla-get-activedocument (vlax-get-acad-object)))) (setq obj (vlax-ename->vla-object (car (entsel)))) (setq c (vlax-get obj "Coordinates") i 0) (repeat (/ (length c) 3) (setq x (nth i c) y (nth (1+ i) c) z (nth (+ 2 i) c)) (vla-addtext *model-space* (rtos z 2) (vlax-3d-point (list x y 0.0)) 3.0) (setq i (+ i 3)) ) (princ) ) (defun c:aaaa () (vl-load-com) (setq *model-space* (vla-get-modelspace (vla-get-activedocument (vlax-get-acad-object)))) (setq obj (vlax-ename->vla-object (car (entsel)))) (setq c (vlax-get obj "Coordinates") i 0) (repeat (/ (length c) 2) (setq x (nth i c) y (nth (1+ i) c)) (vla-addcircle *model-space* (vlax-3d-point (list x y 0.0)) 3.0) (setq i (+ i 2)) ) (princ) )
×
×
  • Create New...