+ Reply to Thread
Results 1 to 6 of 6
  1. #1
    Senior Member
    Using
    AutoCAD 2010
    Join Date
    Feb 2014
    Posts
    130

    Default selection set with point and filters

    Registered forum members do not see this ad.

    I m trying to make a selection set using a point and a couple of lines passing through this point (caution, NOT terminating). I want to select lines of specific layers. What I m typing is this

    Code:
    (setq pt (getpoint "\nSelect point: "))
    (setq ss (ssget pt '((0 . "LINE") (8 . "mylayer"))))
    Unfortunately this doesn't work. The only way I could find is to use this instead

    Code:
    (ssget "C" pt pt '((0 . "LINE") (8 . "mylayer")))
    However I do not find that helpful at all. If there is a line at the back on an other elevation, not crossing the initial line, but coincidentally passing 'visually' through this point (pt) the later ssget command will include both and that is not what I want.

    How could I use a point and filter together? Any help would be appreciated.

  2. #2
    Super Member hmsilva's Avatar
    Discipline
    Multi-disciplinary
    Using
    AutoCAD 2016
    Join Date
    Dec 2012
    Location
    Cascais, Portugal
    Posts
    531

    Default

    Try
    Code:
    (setq ss (ssget pt (list '(0 . "LINE") '(8 . "mylayer")(cons -4 "*,*,=")(cons 10 (list 0.0 0.0 (caddr pt))))))
    ;; or
    (setq ss (ssget "C" pt pt (list '(0 . "LINE") '(8 . "mylayer")(cons -4 "*,*,=")(cons 10 (list 0.0 0.0 (caddr pt))))))
    Henrique

  3. #3
    Senior Member
    Using
    AutoCAD 2010
    Join Date
    Feb 2014
    Posts
    130

    Default

    Thank you. The first one doesn t seem to work. The second works but this way only filtering the Z. If I change the viewpoint of the entire model this will not be reliable. I tried

    Code:
    (setq ss (ssget "C" pt pt (list (cons 0 "LINE") (cons 8 "mylayer") (cons -4 "=,=,=") (cons 10 (list (car pt) (cadr pt) (caddr pt))))))
    but it gives me nil! It should have worked. There is at least one line passing through the pt.

  4. #4
    Super Member hmsilva's Avatar
    Discipline
    Multi-disciplinary
    Using
    AutoCAD 2016
    Join Date
    Dec 2012
    Location
    Cascais, Portugal
    Posts
    531

    Default

    Code:
    (setq pt (getpoint "\nSelect point: "));; your known point
    (setq wpt (trans pt 1 0));; point in WCS
    (setq upt (trans wpt 0 1));; point in actual UCS
    (setq ss (ssget "C" upt upt (list '(0 . "LINE") '(8 . "mylayer")(cons -4 "*,*,=")(cons 10 (list 0.0 0.0 (caddr upt))))))
    HTH
    Henrique

  5. #5
    Senior Member
    Using
    AutoCAD 2010
    Join Date
    Feb 2014
    Posts
    130

    Default

    Thanks! I will look into it.
    Last edited by MJLM; 4th Feb 2015 at 08:13 pm.

  6. #6
    Super Member hmsilva's Avatar
    Discipline
    Multi-disciplinary
    Using
    AutoCAD 2016
    Join Date
    Dec 2012
    Location
    Cascais, Portugal
    Posts
    531

    Default

    Registered forum members do not see this ad.

    You're welcome!


    Henrique

Similar Threads

  1. Question about POINT FILTERS
    By Faouweb in forum AutoCAD 3D Modelling & Rendering
    Replies: 5
    Last Post: 25th Dec 2011, 10:18 am
  2. Point Selection
    By cadpro in forum .NET, ObjectARX & VBA
    Replies: 1
    Last Post: 21st Jun 2011, 03:49 am
  3. Point Filters!?
    By mrmanagerr in forum AutoCAD Beginners' Area
    Replies: 4
    Last Post: 30th Mar 2011, 03:52 pm
  4. Point selection problem
    By KRBeckman in forum AutoLISP, Visual LISP & DCL
    Replies: 3
    Last Post: 19th Feb 2010, 11:57 pm
  5. Selection Set Filters Vlisp
    By nauggie in forum AutoLISP, Visual LISP & DCL
    Replies: 1
    Last Post: 24th Oct 2006, 03:47 pm

Tags for this Thread

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