Delphi4 ACAD2000 GetAttributes Problem

Delphi4 ACAD2000 GetAttributes Problem

Anonymous
Not applicable
217 Views
2 Replies
Message 1 of 3

Delphi4 ACAD2000 GetAttributes Problem

Anonymous
Not applicable
Hello to all ACAD/Delphi Programmers !

Can anybody give me an example how to use the
ACADBlockReference.GetAttributes function in Delphi4.
I haven't solved the problem to retrieve the TagString and ValueString of
six attributes belonging to an ACADBlockReference Object.

Thanks in advance

Juergen
0 Likes
218 Views
2 Replies
Replies (2)
Message 2 of 3

Anonymous
Not applicable
I don't know anything about Delphi but here's how to do it in VB. Maybe you
can translate:

dim atts as variant

atts = blkref.getattributes
for i = lbound(atts) to ubound(atts)
debug.print atts(i).TagString
debug.print atts(i).TextString
Next

--
Get free software and more at http://www2.stonemedia.com/franko

"Juergen Stein" wrote in message
news:MPG.1316249b289b6403989684@adesknews.autodesk.com...
> Hello to all ACAD/Delphi Programmers !
>
> Can anybody give me an example how to use the
> ACADBlockReference.GetAttributes function in Delphi4.
> I haven't solved the problem to retrieve the TagString and ValueString of
> six attributes belonging to an ACADBlockReference Object.
>
> Thanks in advance
>
> Juergen
0 Likes
Message 3 of 3

Anonymous
Not applicable
Here goes the Delphi translation

Procedure GetBlockAttributes(blkref : AcadBlockReference);
var
atts : OleVariant;
i : integer;
Tag, Text : String;
begin
atts := blkref.GetAttributes;
for i:=0 to VarArrayHighBound(atts,1) do
begin
Tag := atts(i).TagString;
Text:= atts(i).TextString;
end;
end;

Frank Oquendo wrote in message
news:88h1fn$qos27@adesknews2.autodesk.com...
> I don't know anything about Delphi but here's how to do it in VB. Maybe
you
> can translate:
>
> dim atts as variant
>
> atts = blkref.getattributes
> for i = lbound(atts) to ubound(atts)
> debug.print atts(i).TagString
> debug.print atts(i).TextString
> Next
>
> --
> Get free software and more at http://www2.stonemedia.com/franko
>
>
> "Juergen Stein" wrote in message
> news:MPG.1316249b289b6403989684@adesknews.autodesk.com...
> > Hello to all ACAD/Delphi Programmers !
> >
> > Can anybody give me an example how to use the
> > ACADBlockReference.GetAttributes function in Delphi4.
> > I haven't solved the problem to retrieve the TagString and ValueString
of
> > six attributes belonging to an ACADBlockReference Object.
> >
> > Thanks in advance
> >
> > Juergen
>
>
0 Likes