PDA

View Full Version : Problem with text alignment



pera451
1st May 2006, 06:30 am
I would be very grateful to anyone that can help me with the following problem.

I have written a program that reads a DXF file, gathers information about certain
geographic points from several layers, joins it and exports it, i.e. by this means
I can obtain node coordinates, elevation and name, pipe type, etc.

The information I use is obtained from simple TEXT objects.

With some drawings that were supplied to me as a basis for my hydraulic analysis, I
had absolutely no problem.

However, with some of them I have great problems, as the spatial information
about TEXT placement differs from the coordinates of the point the text should be
coincident with.

I have found out that TEXT objects are somewhat strange. When they are left aligned,
the values for "Text placement X", "Text placement Y" and "Text placement Z" are non-zero
values, what obviously leads to a difference between text insertion and text alignment point
(exported to a DXF file).

When I use PROPERTIES, these values are grayed out and cannot be changed inside AutoCAD.
I have tried to do that with BricsCAD to and it does not work.

When I use LIST to get information about a TEXT I get a very strange line mentioning
EXTRUSION DIRECTION (this is a 2-D drawing!).

Re-entering hundreds of texts would be a little unpleasant for me.

My questions are:

1) can text alignment be changed, i.e. reset to 0 and how
2) what could have caused this strange phenomenon


Thanks in advance!

CarlB
1st May 2006, 07:53 am
Your reference to "extrusion direction" leads me to surmise text was created with a coordinate system (UCS) not perpendicular to the z axis. Even if that text is converted to 2d drawing as you say, it may retain the extrusion vector data (group code 210). you may have to use that extrusion vector info to transform the coordinates to the "World" coordinate system.

pera451
1st May 2006, 08:18 am
Thank You, CarlB.

Do You think that the damage can be repaired in the DWG file itself, or do I have to manipulate the DXF data?

The first solution would be much more convenient, as the drawing is being continually updated, so the error is "spreading".

CarlB
1st May 2006, 05:26 pm
A possible solution (untried);

Use the Express Tools "flatten" command, if you don't mind having z values set to 0 this may remove the "extrusion vector".

pera451
2nd May 2006, 11:22 am
The use of FLATTEN command from the express tools have solved the problem.

Many thanks to CarlB.