Author Topic: How to enter Block definition to dedelte an entity  (Read 4785 times)

0 Members and 1 Guest are viewing this topic.

Coder

  • Swamp Rat
  • Posts: 827
Re: How to enter Block definition to dedelte an entity
« Reply #15 on: January 17, 2011, 01:24:30 AM »
In genera , how to implement the action at the picked block only . ?

Great thanks.
« Last Edit: January 17, 2011, 01:28:08 AM by coder »

Lee Mac

  • Seagull
  • Posts: 12922
  • London, England
Re: How to enter Block definition to dedelte an entity
« Reply #16 on: January 17, 2011, 11:34:46 AM »
In VL, a neat trick:

Code: [Select]
(if (setq e (car (nentsel))) (vla-delete (vlax-ename->vla-object e)))
This will apply the change to all block references of the block definition relating to the picked block.

If you want the change to apply to a single reference you will need to re-make the block definition with a new name without the object in question. This is better accomplished by copying the block definition (perhaps using my program here), and then applying the necessary changes, this way, Dynamic blocks would still work.

Lee
« Last Edit: January 17, 2011, 01:09:59 PM by Lee Mac »

MP

  • Seagull
  • Posts: 17750
  • Have thousands of dwgs to process? Contact me.
Re: How to enter Block definition to dedelte an entity
« Reply #17 on: January 19, 2011, 08:28:54 PM »
In VL, a neat trick:

Code: [Select]
(if (setq e (car (nentsel))) (vla-delete (vlax-ename->vla-object e)))
This will apply the change to all block references of the block definition relating to the picked block.

If you want the change to apply to a single reference you will need to re-make the block definition with a new name without the object in question. This is better accomplished by copying the block definition (perhaps using my program here), and then applying the necessary changes, this way, Dynamic blocks would still work.

Lee

yep, I have a tool called bnuke built around that very algorithm -- but I didn't give it out to my (former) users -- too many people already already have enough rope to hang themselves
Engineering Technologist • CAD Automation Practitioner
Automation ▸ Design ▸ Drafting ▸ Document Control ▸ Client
cadanalyst@gmail.comhttp://cadanalyst.slack.comhttp://linkedin.com/in/cadanalyst