Replace text in a drawing

Replace text in a drawing

Anonymous
Not applicable
298 Views
4 Replies
Message 1 of 5

Replace text in a drawing

Anonymous
Not applicable
I'm trying to replace text in a drawing using the .TextString property
of a AcadText object.
It works great, but I need to read from a data base and write in a
drawing, like 3 fields with 140 rows, that sums 420 texts to be written in
the drawing.

Is there a better way to do it than just replacing text ?
something like using block, i don't know.

Another problem is that sometimes I choose just 80 rows of those 140,
and I can't replace all the old texts in the drawing. I think that if could
know how is the order that AcadText pick a text, I could solve this problem
just deleting all texts after selection 80º, but it's totally random.

Thanks for your help,

Ralf Davi.
0 Likes
299 Views
4 Replies
Replies (4)
Message 2 of 5

Anonymous
Not applicable
If I understand you, it sounds like you'd be better off using a block with
attributes. As you have found out, selection sets don't have any way of
indexing the objects in them, unless you select each text entity one by one
in the order you want to replace them - and I doubt you want to do that.

When you retrieve attributes from the block they will be in an array in the
order they are defined within the block. If you have express tools installed
take a look at the Block Attribute Manager, this will help you set the block
up so all your attributes are in the proper order.

This won't help too much with you existing drawings, but it will make your
future drawings easier to work with.

Regards,
Jacob.

"Ralf Davi" wrote in message
news:7E9D1F9B00AC5BA325886FCF315F4D1B@in.WebX.maYIadrTaRb...
> I'm trying to replace text in a drawing using the .TextString property
> of a AcadText object.
> It works great, but I need to read from a data base and write in a
> drawing, like 3 fields with 140 rows, that sums 420 texts to be written in
> the drawing.
>
> Is there a better way to do it than just replacing text ?
> something like using block, i don't know.
>
> Another problem is that sometimes I choose just 80 rows of those 140,
> and I can't replace all the old texts in the drawing. I think that if
could
> know how is the order that AcadText pick a text, I could solve this
problem
> just deleting all texts after selection 80º, but it's totally random.
>
> Thanks for your help,
>
> Ralf Davi.
>
>
0 Likes
Message 3 of 5

Anonymous
Not applicable
Do you (or anyboy) know if is there a way of convert a single text in an
attribute ?
Is there a LISP that u just click in the text and it convert to an
attribute ?




"Jacob" escreveu na mensagem
news:60DE09A6CDF9875D25EA5A30AE9ADEB2@in.WebX.maYIadrTaRb...
If I understand you, it sounds like you'd be better off using a block with
attributes. As you have found out, selection sets don't have any way of
indexing the objects in them, unless you select each text entity one by one
in the order you want to replace them - and I doubt you want to do that.

When you retrieve attributes from the block they will be in an array in the
order they are defined within the block. If you have express tools installed
take a look at the Block Attribute Manager, this will help you set the block
up so all your attributes are in the proper order.

This won't help too much with you existing drawings, but it will make your
future drawings easier to work with.

Regards,
Jacob.

"Ralf Davi" wrote in message
news:7E9D1F9B00AC5BA325886FCF315F4D1B@in.WebX.maYIadrTaRb...
> I'm trying to replace text in a drawing using the .TextString property
> of a AcadText object.
> It works great, but I need to read from a data base and write in a
> drawing, like 3 fields with 140 rows, that sums 420 texts to be written in
> the drawing.
>
> Is there a better way to do it than just replacing text ?
> something like using block, i don't know.
>
> Another problem is that sometimes I choose just 80 rows of those 140,
> and I can't replace all the old texts in the drawing. I think that if
could
> know how is the order that AcadText pick a text, I could solve this
problem
> just deleting all texts after selection 80º, but it's totally random.
>
> Thanks for your help,
>
> Ralf Davi.
>
>
0 Likes
Message 4 of 5

Anonymous
Not applicable
I suppose you could write a macro to create an attribute in the same
location the text existed in, then erase the text. Why would you want to do
this?

Jacob.

"Ralf Davi" wrote in message
news:F4CF70961241BA664E201BDDA292139D@in.WebX.maYIadrTaRb...
> Do you (or anyboy) know if is there a way of convert a single text in
an
> attribute ?
> Is there a LISP that u just click in the text and it convert to an
> attribute ?
>
>
>
>
> "Jacob" escreveu na mensagem
> news:60DE09A6CDF9875D25EA5A30AE9ADEB2@in.WebX.maYIadrTaRb...
> If I understand you, it sounds like you'd be better off using a block with
> attributes. As you have found out, selection sets don't have any way of
> indexing the objects in them, unless you select each text entity one by
one
> in the order you want to replace them - and I doubt you want to do that.
>
> When you retrieve attributes from the block they will be in an array in
the
> order they are defined within the block. If you have express tools
installed
> take a look at the Block Attribute Manager, this will help you set the
block
> up so all your attributes are in the proper order.
>
> This won't help too much with you existing drawings, but it will make your
> future drawings easier to work with.
>
> Regards,
> Jacob.
>
> "Ralf Davi" wrote in message
> news:7E9D1F9B00AC5BA325886FCF315F4D1B@in.WebX.maYIadrTaRb...
> > I'm trying to replace text in a drawing using the .TextString
property
> > of a AcadText object.
> > It works great, but I need to read from a data base and write in a
> > drawing, like 3 fields with 140 rows, that sums 420 texts to be written
in
> > the drawing.
> >
> > Is there a better way to do it than just replacing text ?
> > something like using block, i don't know.
> >
> > Another problem is that sometimes I choose just 80 rows of those
140,
> > and I can't replace all the old texts in the drawing. I think that if
> could
> > know how is the order that AcadText pick a text, I could solve this
> problem
> > just deleting all texts after selection 80º, but it's totally random.
> >
> > Thanks for your help,
> >
> > Ralf Davi.
> >
> >
>
>
0 Likes
Message 5 of 5

Anonymous
Not applicable
To kind of convert all my texts in the drawing to attributes.
I just click in each of them and it turns a attribute.

I think its better than delete each of the text and put and attribute in
the same place.

thanks,

Ralf Davi.

"Jacob" escreveu na mensagem
news:20A89D092AA7548E337F91162B07F9C2@in.WebX.maYIadrTaRb...
> I suppose you could write a macro to create an attribute in the same
> location the text existed in, then erase the text. Why would you want to
do
> this?
>
> Jacob.
>
> "Ralf Davi" wrote in message
> news:F4CF70961241BA664E201BDDA292139D@in.WebX.maYIadrTaRb...
> > Do you (or anyboy) know if is there a way of convert a single text
in
> an
> > attribute ?
> > Is there a LISP that u just click in the text and it convert to an
> > attribute ?
> >
> >
> >
> >
> > "Jacob" escreveu na mensagem
> > news:60DE09A6CDF9875D25EA5A30AE9ADEB2@in.WebX.maYIadrTaRb...
> > If I understand you, it sounds like you'd be better off using a block
with
> > attributes. As you have found out, selection sets don't have any way of
> > indexing the objects in them, unless you select each text entity one by
> one
> > in the order you want to replace them - and I doubt you want to do that.
> >
> > When you retrieve attributes from the block they will be in an array in
> the
> > order they are defined within the block. If you have express tools
> installed
> > take a look at the Block Attribute Manager, this will help you set the
> block
> > up so all your attributes are in the proper order.
> >
> > This won't help too much with you existing drawings, but it will make
your
> > future drawings easier to work with.
> >
> > Regards,
> > Jacob.
> >
> > "Ralf Davi" wrote in message
> > news:7E9D1F9B00AC5BA325886FCF315F4D1B@in.WebX.maYIadrTaRb...
> > > I'm trying to replace text in a drawing using the .TextString
> property
> > > of a AcadText object.
> > > It works great, but I need to read from a data base and write in a
> > > drawing, like 3 fields with 140 rows, that sums 420 texts to be
written
> in
> > > the drawing.
> > >
> > > Is there a better way to do it than just replacing text ?
> > > something like using block, i don't know.
> > >
> > > Another problem is that sometimes I choose just 80 rows of those
> 140,
> > > and I can't replace all the old texts in the drawing. I think that if
> > could
> > > know how is the order that AcadText pick a text, I could solve this
> > problem
> > > just deleting all texts after selection 80º, but it's totally random.
> > >
> > > Thanks for your help,
> > >
> > > Ralf Davi.
> > >
> > >
> >
> >
>
>
0 Likes