DXF text moves with each save
DXF text moves with each save
(OP)
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.
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.





RE: DXF text moves with each save
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
indocti discant et ament meminisse periti
RE: DXF text moves with each save
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...
RE: DXF text moves with each save
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.