Author Topic: returned as a AcadBlockReference  (Read 4639 times)

0 Members and 1 Guest are viewing this topic.

Humbertogo

  • Guest
returned as a AcadBlockReference
« on: March 27, 2006, 08:12:00 AM »
Is there any possibility to explode AcadBlockReference.. do some changes
in all entry and returned as a AcadBlockReference  back

Thanks

Keith™

  • Villiage Idiot
  • Seagull
  • Posts: 16899
  • Superior Stupidity at its best
Re: returned as a AcadBlockReference
« Reply #1 on: March 27, 2006, 09:06:52 AM »
Well, I suppose it is possible ... I would just have to look at how it needed to be handled to do what you are needing. If you are simply wanting to redefine a block reference, you should probably redefine the block itself in the block table. You can enumerate the individual entities in the block and modify as needed.
Proud provider of opinion and arrogance since November 22, 2003 at 09:35:31 am
CadJockey Militia Field Marshal

Find me on https://parler.com @kblackie

Dnereb

  • Guest
Re: returned as a AcadBlockReference
« Reply #2 on: March 27, 2006, 10:03:21 AM »
You don't need to do explode the block to do the damage.
It's possible to alter a block just like in refedit.

Humbertogo

  • Guest
Re: returned as a AcadBlockReference
« Reply #3 on: March 27, 2006, 10:47:14 AM »
Quote
You don't need to do explode the block to do the damage.
It's possible to alter a block just like in refedit.

Pls explame more about

Bryco

  • Water Moccasin
  • Posts: 1883
Re: returned as a AcadBlockReference
« Reply #4 on: March 28, 2006, 12:46:59 AM »
Hi Humbertogo
Make a block with a circle and run this

Sub BlockEdit()

    Dim oBlocks As AcadBlocks
    Dim oBlock As AcadBlock
    Dim oBref As AcadBlockReference
    Dim Ent As AcadEntity
    Dim V, BlockEnt As AcadEntity
    Set oBlocks = ThisDrawing.Blocks
    ThisDrawing.Utility.GetEntity Ent, V, "Pick a blockreference:"
    If TypeOf Ent Is AcadBlockReference Then
        Set oBlock = oBlocks(Ent.Name)
        For Each BlockEnt In oBlock
            If TypeOf BlockEnt Is AcadCircle Then
                BlockEnt.radius = BlockEnt.radius * 2
                BlockEnt.Color = acRed
                Ent.Update
                Exit For
            End If
        Next BlockEnt
   
    End If

End Sub


I remember wanting to explode blocks to find the arcs and the lines, if you need that I have some stuff

Jürg Menzi

  • Swamp Rat
  • Posts: 599
  • Oberegg, Switzerland
Re: returned as a AcadBlockReference
« Reply #5 on: March 28, 2006, 01:19:32 AM »
I remember wanting to explode blocks to find the arcs and the lines, if you need that I have some stuff

Remember that you can't explode NUS blocks with the Explode method since A2k4...
A computer's human touch is its unscrupulousness!
MENZI ENGINEERING GmbH
Current A2k16... A2k24 - Start R2.18

Bryco

  • Water Moccasin
  • Posts: 1883
Re: returned as a AcadBlockReference
« Reply #6 on: March 28, 2006, 10:29:31 AM »
Ouch didn't know that. Now another function to make.

Humbertogo

  • Guest
Re: returned as a AcadBlockReference
« Reply #7 on: March 30, 2006, 08:53:34 AM »
Thanks again