Text appearing in the wrong place.

Text appearing in the wrong place.

Anonymous
Not applicable
820 Views
3 Replies
Message 1 of 4

Text appearing in the wrong place.

Anonymous
Not applicable

Hello,

 

I'm using the following piece of code to write "00" at a specific location. It worked until I added justification (cons 72 & 73) to it, now it just appears at (0,0) instead of (733.514, 256.688). Why the hell has it decided to do that?

 

 

 (entmake (list (cons 0 "text") (cons 10 (list 733.514 256.688 0)) (cons 40 1.8)(cons 50 0.0)(cons 7 "Arial")(cons 1 "00")(cons 72 1)(cons 73 2))) ;Add Revision "00" Text

 

0 Likes
821 Views
3 Replies
Replies (3)
Message 2 of 4

Anonymous
Not applicable

So, I worked it out, i was because DXF code 11 (Second alignment point) was missing, I've added it in so it work, but I don't really understand why it needs it, what does it do?

0 Likes
Message 3 of 4

cadffm
Consultant
Consultant

This code can not create a TEXT, not at the wrong place and not at the right one.

Wrong code posted or i am wrong?

 

The first location you should read is your help!

DXF TEXT object

 

Some compares to see what happens in the background of gui editing:

1.Create a TEXT by using your mouse, Justify to the default (LEFT)

2.Copy this text, change the Justify to middle-left

3.Copy this text, change the Justify to center

 

4.Copy this text, change the Justify to middle-center

 

Compare the entity data now , (entget(car(entsel)))

compare Text1 with Text2, (one value changed)

Text1 with Text2, (one value changed)

Text1 with Text3, (both values changed)

 

and if you really like to use middle-center: the last one is:

Compare text1 with text4, both values changes and another dxf code (11) appears,

thats the important insertion-point for this Justify/middel center.

 

Open your Help and read more about the DXF TEXT Object.

DXF code 72 and 73 , and 11

Sebastian

0 Likes
Message 4 of 4

ВeekeeCZ
Consultant
Consultant

When entmaking a text with some alignment parameters set the same points for both codes 10 and 11. (or in fact, 10 could be just any but nothing). What matters is code 11. When text is created it matches the 11. 10 is recalculated by given alignment parameters.

That's the way it works.

0 Likes