Author Topic: get entity data inside a block  (Read 1953 times)

0 Members and 1 Guest are viewing this topic.

curmudgeon

  • Newt
  • Posts: 194
get entity data inside a block
« on: March 24, 2009, 03:05:46 PM »
it would save me a lot of time, and I could do other programming......
and the boss, my lovely wife, would be MUCH more affectionate - (read: understand WHY I waste my time so. )

I have blocks with plain old simple text in them. I want to be able to select one of these blocks by picking the text and return the (1 . "good stuff").
this would impress her beyond words. she might even consider kissing me. measure that in microseconds, the considering of.

anybody have one on the shelf you can let me have, or point me to?
( anything that points me in the right direction is good too. I have a feeling it is going to involve nentsel. )

thanks.

roy
Never express yourself more clearly than you are able to think.

MP

  • Seagull
  • Posts: 17750
  • Have thousands of dwgs to process? Contact me.
Re: get entity data inside a block
« Reply #1 on: March 24, 2009, 03:08:21 PM »
(if (setq ename (nentsel))
    (assoc 1 (entget ename))
)
Engineering Technologist • CAD Automation Practitioner
Automation ▸ Design ▸ Drafting ▸ Document Control ▸ Client
cadanalyst@gmail.comhttp://cadanalyst.slack.comhttp://linkedin.com/in/cadanalyst

gile

  • Gator
  • Posts: 2507
  • Marseille, France
Re: get entity data inside a block
« Reply #2 on: March 24, 2009, 03:31:28 PM »
Quote
(if (setq ename (nentsel))
    (assoc 1 (entget ename))
)

(if (setq ename (car (nentsel)))
    (assoc 1 (entget ename))
)
Speaking English as a French Frog

MP

  • Seagull
  • Posts: 17750
  • Have thousands of dwgs to process? Contact me.
Re: get entity data inside a block
« Reply #3 on: March 24, 2009, 03:39:11 PM »
yep, shouldn't code blind or when I have a sammich in my hand
Engineering Technologist • CAD Automation Practitioner
Automation ▸ Design ▸ Drafting ▸ Document Control ▸ Client
cadanalyst@gmail.comhttp://cadanalyst.slack.comhttp://linkedin.com/in/cadanalyst

curmudgeon

  • Newt
  • Posts: 194
Re: get entity data inside a block
« Reply #4 on: March 24, 2009, 03:46:32 PM »
yep, shouldn't code blind or when I have a sammich in my hand

"wowzers!"

if embarrassment were possible.....
 :ugly:

thanks
Never express yourself more clearly than you are able to think.