×
INTELLIGENT WORK FORUMS
FOR ENGINEERING PROFESSIONALS

Log In

Come Join Us!

Are you an
Engineering professional?
Join Eng-Tips Forums!
  • Talk With Other Members
  • Be Notified Of Responses
    To Your Posts
  • Keyword Search
  • One-Click Access To Your
    Favorite Forums
  • Automated Signatures
    On Your Posts
  • Best Of All, It's Free!
  • Students Click Here

*Eng-Tips's functionality depends on members receiving e-mail. By joining you are opting in to receive e-mail.

Posting Guidelines

Promoting, selling, recruiting, coursework and thesis posting is forbidden.

Students Click Here

Jobs

DXF text moves with each save

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.

RE: DXF text moves with each save

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

RE: DXF text moves with each save

(OP)
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...

RE: DXF text moves with each save

(OP)
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.

Red Flag This Post

Please let us know here why this post is inappropriate. Reasons such as off-topic, duplicates, flames, illegal, vulgar, or students posting their homework.

Red Flag Submitted

Thank you for helping keep Eng-Tips Forums free from inappropriate posts.
The Eng-Tips staff will check this out and take appropriate action.

Reply To This Thread

Posting in the Eng-Tips forums is a member-only feature.

Click Here to join Eng-Tips and talk with other members!


Resources