How can I remove a object from a array?

How can I remove a object from a array?

Anonymous
Not applicable
460 Views
1 Reply
Message 1 of 2

How can I remove a object from a array?

Anonymous
Not applicable
Hallo,
I have a acad 2000-drawing and I need a special array from objets with VBA.
1. I have select in the drawing the last object with:
sset.Select acSelectionSetLast
It is always a block!
2. then I exploded the block with: vntObjectExploded = objBlock.Explode
and count the objects in vntObjectExploded (for example: 8)
3. so I have 8 objects in the array vntObjectExploded
4. now must one or two objects (AcmPartRef) from THIS array delete
How I can do it?
With the new array I create a new block.

Who can help me?


Thanks
Hartmut Callies
0 Likes
461 Views
1 Reply
Reply (1)
Message 2 of 2

Anonymous
Not applicable
I have begun using Dictionary (thats a vb style dictionary not an ACAD type
of dictionary) for all simple arrays...you have to add a reference to
Microsoft Scripting Runtime and create the object
Dim objDict 'Create a variable
Set objDict = CreateObject("Scripting.Dictionary")

it has a lot of built in methods such as: add, exists, remove, removeall and
my favorites items and keys which return arrays of their respective values.

RBinning


"Hartmut Callies" wrote in message
news:97C50115EBFEC8C534B08C68D458A89C@in.WebX.maYIadrTaRb...
> Hallo,
> I have a acad 2000-drawing and I need a special array from objets with
VBA.
> 1. I have select in the drawing the last object with:
> sset.Select acSelectionSetLast
> It is always a block!
> 2. then I exploded the block with: vntObjectExploded = objBlock.Explode
> and count the objects in vntObjectExploded (for example: 8)
> 3. so I have 8 objects in the array vntObjectExploded
> 4. now must one or two objects (AcmPartRef) from THIS array delete
> How I can do it?
> With the new array I create a new block.
>
> Who can help me?
>
>
> Thanks
> Hartmut Callies
>
>
>
>
0 Likes