You may have to use an Object array and then post process if you need it
cast differently.
{code}
Object[] Objs = acadBlockRef.GetConstantAttributes();
AcadAttribute[] Atts = new AcadAttribute[Objs.Length];
Objs.CopyTo(Atts, 0);
{code}
--
James Allen
Malicoat-Winslow Engineers, P.C.
Columbia, MO
lial.williams@arnold.af.mil wrote:
> I am trying to extract the text from the Constant attributes attached to a BlockReference.
> I know I have to use a COM object.
> The acadBlockRef returns a type System.Object.
> How do I get to the attributes inside the AcadBlockReference???
>
> The code is as follows:
>
> foreach (ObjectId aID in dwgDeviceIds)
> {
> //Create a reference to the block and open it for reading
> BlockReference myBR = (BlockReference)tm.GetObject(aID, OpenMode.ForRead);
>
> if (myBR.Layer.Equals("PIDSYM"))
> {
>
> AcadBlockReference acadBlockRef = (AcadBlockReference) myBR.AcadObject;
>
> ??????? = acadBlockRef.GetConstantAttributes();
> }
> }
>