Eng-Tips is the largest engineering community on the Internet

Intelligent Work Forums for Engineering Professionals

  • Congratulations waross on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

DXF text moves with each save

Status
Not open for further replies.

2briancox

Aerospace
Dec 22, 2014
34
0
0
US
We have an issue where every time we open a DXF file with CATIA and then re-save the file, the text always drifts upward slightly (in whatever orientation the text is in -- upside down text drifts downward). So if you open and close the same DXF file many times, saving each time, you will have very dramatic text movement.

Has anyone else ever come across this? I am thinking a solution would be to perform a study by how much each text shifts (perhaps test various text sizes, styles, etc.) and then develop a script to undo that shift for every text in the CATDrawing. But I am not at the data collection phase yet.
 
Replies continue below

Recommended for you

I have dimension set in Feet, inches, Decimal()
I created a drawing with default ISO std and a text at 1",1" with default text anchor top left,save the drawing, export as DXF
open the DXF, explode block and find text at 1",067" with anchor at bottom left

Back in CATDrawing, I duplicate the text at and change the anchor point to bottom left, having now 2 text. save drawing save as dxf.
open DXF explode bloc and find text 2 at 1",1.006" and text 1 at 1" .067" both with anchor at bottom left

Switch unit to mm, also try another font (ARIAL)

I have same position problem.

I was checking with R20... Have fun



Eric N.
indocti discant et ament meminisse periti
 
For R23, using Monospac821 in inches:

I've done a preliminary analysis of the magnitude of each move against the font size. Roughly, for font sizes between 3.5 and 254, the formula looks to be around:
.0003 fontsize^3 - 0.0108 fontsize^2 + 0.1738 fontsize - 0.5317.

Corrections of that magnitude in the angle of the text seem to be fairly good at keeping the text close to where I want.

There may still be a way to keep these from moving. Maybe changing to metric, opening the file and then switching back to empirical or something like that. But trying to find a solution similar to that is like shooting in the dark for now. So I'll keep what I have until I hear of something better...
 
I was wrong. The above formula was my estimation of what happens when you just keep going through a Cycle of "Open-Save-Open-Save"...etc. In other words, it is not a formula for correction, only an analysis for what appears to happen.

After much more research, I developed the code which seems to fix all text to a node on a 1mm x 1mm grid and permanently keeps them there through infinite "Open/Save" cycles -- at least for all fontsizes up to 37. More testing is needed for larger fonts.

But I can't post code, sorry. It was done for work so it is proprietary.
 
Status
Not open for further replies.
Back
Top