Author Topic: Delete Item from a block  (Read 11869 times)

0 Members and 1 Guest are viewing this topic.

CAB

  • Global Moderator
  • Seagull
  • Posts: 10401
Re: Delete Item from a block
« Reply #15 on: September 21, 2006, 08:23:02 AM »
Andy,
Just a typo in the latest routine.
Change theses two lines:
Code: [Select]
   (equal (vla-get-IsXref Blk) :vlax-false)
   (equal (vla-get-IsLayout Blk) :vlax-false)
Needs to be Blk and not Obj.

Also you will need a (regen) to see the results. At least I did.
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.

T.Willey

  • Needs a day job
  • Posts: 5251
Re: Delete Item from a block
« Reply #16 on: September 21, 2006, 11:05:53 AM »
Tim,
I stand corrected, Nice example. :-)
Using plain lisp would be messy at best.
Thanks Alan.

When I try to run this lisp, i get an error message

; error: bad argument type: VLA-OBJECT nil

What am I doing wrong. I've typed in (vl-load-com) first but it makes no difference.
Andy,
Just a typo in the latest routine.
Change theses two lines:
Code: [Select]
   (equal (vla-get-IsXref Blk) :vlax-false)
   (equal (vla-get-IsLayout Blk) :vlax-false)
Needs to be Blk and not Obj.

Also you will need a (regen) to see the results. At least I did.
Correct.  Oops  :oops:

If you need a regen in there, then add this line to the end of the code, before the (princ) line.
Code: [Select]
(vla-Regen ActDoc acActiveViewport)
Tim

I don't want to ' end-up ', I want to ' become '. - Me

Please think about donating if this post helped you.