Author Topic: entity help  (Read 4763 times)

0 Members and 1 Guest are viewing this topic.

Kerry

  • Mesozoic relic
  • Seagull
  • Posts: 11654
  • class keyThumper<T>:ILazy<T>
Re: entity help
« Reply #15 on: July 29, 2007, 10:13:38 PM »
Then have a look at the results of this ..
Code: [Select]
(IF (SETQ ss (SSGET ":S:E" '((0 . "LINE,ARC,CIRCLE"))))
  (SETQ ename   (SSNAME ss 0)
        data    (ENTGET ename)
        enttype (CDR (ASSOC 0 data))
  )
)
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.

crowellsr

  • Guest
Re: entity help
« Reply #16 on: July 29, 2007, 10:19:41 PM »
Thanks Kerry, it now gets the picked point and the type of entity. I can now start woking on the different sections of the program that it is directed to depending on the entity type.

Steve

CAB

  • Global Moderator
  • Seagull
  • Posts: 10401
Re: entity help
« Reply #17 on: July 29, 2007, 11:45:18 PM »
And to get the pick point with ssget.
Code: [Select]
  (if (setq ss (ssget ":S:E" '((0 . "LINE,ARC,CIRCLE"))))
    (setq ssdata  (ssnamex ss 0)
          ename   (cadar ssdata)
          elist   (entget ename)
          enttype (cdr (assoc 0 data))
          PickPt  (cadr (car (cdddar ssdata)))
    )
  )
I've reached the age where the happy hour is a nap. (°¿°)
Windows 10 core i7 4790k 4Ghz 32GB GTX 970
Please support this web site.