Author Topic: Fence Selection with Express Tools Version 2013, 2014 and 2015  (Read 2146 times)

0 Members and 1 Guest are viewing this topic.

ymg

  • Guest
The following is a routine that I use regularly on Autocad 2012
with Express Tools to effect a Fence Selection from a polyline.

Code: [Select]
;; getfencesel        by ymg                                               ;
   ;;                                                                         ;
   ;; Arguments:  en,  Linear Entity Name (Polylines, Arc, Ellipse etc.)      ;
   ;;            flt,  A valid Entity filer Ex: '((0 . "3DFACE"))  or nil     ;
   ;;                                                                         ;
   ;;   Returns: A Selection Set of Entities touching the selecting entity.   ;
   ;;                                                                         ;
   ;;  Requires: Express Tools                                                ;
   ;;                                                                         ;

   (defun getfencesel (en flt / fe px ss)   
      (acet-ss-zoom-extents (setq ss (ssadd en)))
      (setq px (* 0.75 (acet-geom-pixel-unit))
            fe (acet-list-remove-adjacent-dups (acet-geom-object-point-list en (/ px 2.0)))
            ss (if flt (ssget "_F" fe flt) (ssget "_F" fe))
      )     
   )

On another board, one poster is telling me it does not work with Autocad 2014.
However I suspect his installation might not be complete.

I would appreciate if some of you coud test it on Version 2013, 2014 and 2015

Thanks,

ymg

Kerry

  • Mesozoic relic
  • Seagull
  • Posts: 11654
  • class keyThumper<T>:ILazy<T>
Re: Fence Selection with Express Tools Version 2013, 2014 and 2015
« Reply #1 on: May 13, 2014, 11:25:20 PM »
AC 2014 Vanilla

Code - Auto/Visual Lisp: [Select]
  1. (defun c:testIt ( /ss)
  2.   (setq ss (getfencesel (car (entsel)) nil))
  3.   (princ (strcat "\nObject count : " (itoa (sslength ss))))
  4.   (princ)
  5. )

Quote
Command: TESTIT
Select object:
Object count : 7

Seems fine.
kdub, kdub_nz in other timelines.
Perfection is not optional.
Everything will work just as you expect it to, unless your expectations are incorrect.
Discipline: None at all.

Kerry

  • Mesozoic relic
  • Seagull
  • Posts: 11654
  • class keyThumper<T>:ILazy<T>
Re: Fence Selection with Express Tools Version 2013, 2014 and 2015
« Reply #2 on: May 13, 2014, 11:36:49 PM »

Interestingly though , the count differs depending on the shape of the pline

kdub, kdub_nz in other timelines.
Perfection is not optional.
Everything will work just as you expect it to, unless your expectations are incorrect.
Discipline: None at all.

ymg

  • Guest
Re: Fence Selection with Express Tools Version 2013, 2014 and 2015
« Reply #3 on: May 14, 2014, 12:02:25 AM »
Kerry,

Thanks, but now it means that I need to check Version.

Would like to know if the one I submitted would run OK
or Express Tools has changed???

Or maybe I understand wrong is there a getfencesel in ACAD 2014
or you used the one I supplied?

The different count I believe has to do with the dotted line.

ymg
« Last Edit: May 14, 2014, 12:11:35 AM by ymg »

ymg

  • Guest
Re: Fence Selection with Express Tools Version 2013, 2014 and 2015
« Reply #4 on: May 14, 2014, 04:09:16 PM »
Anybody running 2015 Out There ?

ymg

ronjonp

  • Needs a day job
  • Posts: 7529
Re: Fence Selection with Express Tools Version 2013, 2014 and 2015
« Reply #5 on: May 14, 2014, 04:19:33 PM »
Works fine here running 2015 x64.

Windows 11 x64 - AutoCAD /C3D 2023

Custom Build PC

ymg

  • Guest
Re: Fence Selection with Express Tools Version 2013, 2014 and 2015
« Reply #6 on: May 14, 2014, 05:10:38 PM »
Thanks Kerry and RonJomp

Appreciated!

ymg