Is it possible to change attributes' values from VB6?

Is it possible to change attributes' values from VB6?

Anonymous
Not applicable
116 Views
2 Replies
Message 1 of 3

Is it possible to change attributes' values from VB6?

Anonymous
Not applicable
From my VB6 project , using ObiectDBX, I can read attributes' values without opening the draw. Can I edit(change) them also?
I tried something like:
Dim varattribs As Variant
varattribs = objblockref.GetAttributes
For i = 0 To UBound(varattribs)
If varattribs(i).TagString = attr_name Then
varattribs(i).TextString = attr_value
End If
Next i
....then I save the draw.


The varattribs variant array is filled but this code doesn't change the values of the attribute
What's wrong? Is it possible?
Tank you in advance for your help: It is very important for me to know (fast) if it is possible.
0 Likes
117 Views
2 Replies
Replies (2)
Message 2 of 3

Anonymous
Not applicable
Try calling the Update method of either the attribute entity or its parent
block.

--
Tools you can use: get your free copy of ProPack
http://www.acadx.com

"egiuliani" wrote in message
news:ef4ec33.-1@WebX.SaUCah8kaAW...
> From my VB6 project , using ObiectDBX, I can read attributes' values
without opening the draw. Can I edit(change) them also?
> I tried something like:
> Dim varattribs As Variant
> varattribs = objblockref.GetAttributes
> For i = 0 To UBound(varattribs)
> If varattribs(i).TagString = attr_name Then
> varattribs(i).TextString = attr_value
> End If
> Next i
> ....then I save the draw.
>
> The varattribs variant array is filled but this code doesn't change the
values of the attribute
> What's wrong? Is it possible?
> Tank you in advance for your help: It is very important for me to know
(fast) if it is possible.
>
>
0 Likes
Message 3 of 3

Anonymous
Not applicable
THANK YOU! THANK YOU! THANK YOU!
0 Likes