Jump to content

Search the Community

Showing results for tags 'points list'.

  • 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 everybuddies, I am new to lisp, so please for your advise. I want to pick an existing multi-segment polyline and use it as a selection fence (ssget "_F") As far as I understand I miss a simple piece of code that lists the points of the polyline in a way that ssget can accept them as a list of points to define the fence. (setq POLY (entsel "\n Pick a Fence Line crossing your beloved entities:")) ****POLY---->(please help!)----->POINTLIST**** (setq ss (ssget "_F" POINTLIST ) ) Thanx in advance
  2. I have a a couple of connected lines in Autocad representing a pipe network. I have a simple lisp routine that parses through all lines and writes in a list all intersections like that (defun nodes (/ s ent i p a b w k) ; creates text labeling on each intersection (setq s (ssget "X" '((0 . "LINE")))) (setq pl nil) (repeat (setq i (sslength s)) (setq ent (entget (ssname s (setq i (1- i))))) (setq p (cdr (assoc 10 ent))) (if (not (member p pl)) (progn (setq k 0) (foreach w pl (if (not (equal w p 0.001)) (setq k (1+ k)) ) ) (if (= k (length pl)) (setq pl (append pl (list p))) ) ) ) (setq p (cdr (assoc 11 ent))) (if (not (member p pl)) (progn (setq k 0) (foreach w pl (if (not (equal w p 0.001)) (setq k (1+ k)) ) ) (if (= k (length pl)) (setq pl (append pl (list p))) ) ) ) ) (princ) ) Using this list I want to number these nodes for the lines connected like that So parsing through each line I have: (setq pt10 (assoc 10 lineprop)) (setq pt11 (assoc 11 lineprop)) (setq node1 (itoa (1+ (vl-position (cdr pt10) pl)))) (setq node2 (itoa (1+ (vl-position (cdr pt11) pl)))) Here comes my problem. For some reason a point (coordinate) in the pl list is not recognized and gives error that it can not find the (cdr ptxx) in the pl list although apparently it is the same. I tried to type manually also !pl returns: ((0.0 0.0 0.09) (5.0 0.0 0.0) ... (3.0 4.0 5.0) ... (7.0 6.0 6.0) (10.0 6.0 6.0)) (member '(3.0 4.0 5.0) pl) returns: nil I understand that the (3.0 4.0 5.0) is not 100% identical with the point in the list. But how can I correct this problem? Any help would be appreciated.
×
×
  • Create New...