×
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

drawing to dxf journal

drawing to dxf journal

drawing to dxf journal

(OP)
After a few days of messing around with 2D exchange and dxf export options in hope of getting accurate, fast, and consistent dxf exports of our drawings, I have given up and am falling back on the tried and true method of exporting a cgm and then exporting a dxf of that. To help automate this process, I wrote a journal file (attached). The output will be dxf file(s); the journal handles multi-sheet drawings as multiple dxf file output. If you have part '12345_dwg.prt' which has 2 drawing sheets, the output will be '12345_dwg_1.dxf' and '12345_dwg_2.dxf'.

Near the beginning of the journal there is a string constant defined which is the path to your 'dxfdwg.def' file. Change this to the location of your file then save the journal and run it when needed.

I could use some help/feedback on 2 main areas:

1) bug hunting: while it has been pretty stable in my testing, I don't guarantee it to be bulletproof. Please respond with any bugs or problems you experience. Probably the most common error you will get is the dxf translator telling you 'file not found' (more about that below); if this is the case try increasing the number in the 'sleep' statment.

2)suggestions for improvements: specifically the journal could use a better way to wait for the dxf translator to finish. When I added the lines to clean up the temp files created, I found out that the dxf translator is started asynchronously (ie the rest of the journal doesn't wait for the translator to finish before it plows through the rest of the commands). I added a 'sleep' statement in the main loop (basically a 'hack' to get it to work) which has worked on the files I tested with, but depending on your computer specs and the files you translate may not work 100% of the time. Eliminating the temp file cleanup would solve the problem but would require some tedious 'seek and destroy' missions later.

 

RE: drawing to dxf journal

I did a similar journal some time ago, and in order to get the required output for auto-bad, i had to change the colour of all the curves to white, then rotate the whole thing by 90'  about the X-axis so that it was then exported on the X-Z axes which apparently opens fine in auto-bad !!

RE: drawing to dxf journal

Cowski,
When i read thru the code, i noticed that it loads into the "BLANK" template, and since i turn that option off in my defaults, and use my own start-part (in startup folder), i had to set it back on to be able to use the .vb , Is there an easy way for me to add a path and file name so it won't need to look for the BLANK file?

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