|
|
Thread Tools | Search this Thread | Rate Thread | Display Modes |
#1
|
||||
|
||||
Right Click Translation to DXF, IGES, etc.
If you do a lot of translation of MI files to some other format you might want to try this out. That attached Web Archive file contains instructions on how to setup Windows so that you can right click one or more *.mi files in Explorer and translate them to any of the export formats supported by Drafting/ME10 (DXF, DWG, DWF, IGES, VRML). This is a much easier than using the user interface or batch method to translate several MI files.
If anyone can't view the attached file let me know. I can attach a PDF as well, but it is not as clear.
__________________
John Scheffel |
#2
|
|||
|
|||
Just wanted to mention that I tried this on OSD12 Annotation and it works the same. Thanks for posting this. Now I just need to figure out how to get it to handle multi-sheet drawings properly (lumps them on top of each other right now). Bet there's a switch I'm missing somewhere...
|
#3
|
||||
|
||||
Quote:
Someone recently asked me if there was an easy way to save all the sheets in a drawing as DXF instead of doing them one at a time. I wrote a quick and dirty macro to do this from inside Drafting. It saves each sheet to a temporary MI file then translates it to DXF so that you end up with one DXF file for each sheet. I will do some cleanup on it and post it here when it's ready. Another option would be to use the "Arrange Sheets" goodie before saving the MI file from Annotation. After translation to DXF, you will end up with all the sheets lined up in a horizontal row. Hopefully CoCreate will provide better multiple sheet handling for both Annotation and Drafting in the future (such as plotting all the sheets in one shot, saving them to different formats, etc).
__________________
John Scheffel |
#4
|
|||
|
|||
Well, I have an open call with CoCreate Support to deal with saving multi-sheet drawings in one shot. If they find a switch, I will definitely post it here.
Just being able to save a multi-sheet Annotation drawing into multiple MI files (one per sheet) would be of assistance. Unfortunately, my knowledge of Drafting can probably fill a thimble. |
#5
|
|||
|
|||
hello John,
I am sorry to say that I can not download your attachment. Can you make it pdf please? Or can you give me a tip how to download it correctly? Best regards, Harry |
#6
|
||||
|
||||
I can't open the file directly by left clicking the link either. I think this worked when I first posted it, but with all the anti-virus protections our company has added in the last year maybe it has been disabled.
However, I can download it. If you right click and select "Save Target As...", you should be able to save the file to your Desktop or a local folder. Double clicking the file should open it in Internet Explorer.
__________________
John Scheffel |
#7
|
||||
|
||||
Quote:
Attachment deleted since it contained an error, see new attachment below
__________________
John Scheffel |
#8
|
|||
|
|||
I downloaded the macro and it got partway through before saying that "MEDIR" was not a defined macro. Am I missing something?
|
#9
|
||||
|
||||
Quote:
Try the attached file in which Medir has been replaced by MEDIR. It also contains a correction to the prompt, which said the file would be named ".mi" and should have been ".dxf". Attachment deleted since it did not work, see new attachment below
__________________
John Scheffel |
#10
|
|||
|
|||
Well, I no longer get an error message, but I also do not get any DXF files. I see window open briefly, apparently the DXF converter kicking on in the background, but it blinks by so quickly I don't have the chance to see what it says.
For the heck of it, I tried running this under Annotation using: Code:
(oli::sd-execute-annotator-command :cmd (format nil "input 'save_sheets_dxf.m'")) |
#11
|
||||
|
||||
May, can you try running the following command and post the result.
DISPLAY (MEDIR) I suspect your problem may be related to a MEDIR path containing blanks. Our internal installation process uses a path with no blanks to avoid some odd issues that may occur. I did some playing around with the macro and figured out how to make it work with a MEDIR path containing blanks. Not as easy as I thought, since enclosing the executable path in double quotes did not work (as it does in DOS or a command window). It turned out I had to enclose the entire command string in double quotes as well. Not sure why, but it seems to work. Try the attached file and see if it now works for you.
__________________
John Scheffel |
#12
|
|||
|
|||
Hi John,
You hit the nail on the head. My path is: C:/Program Files/CoCreate/OSD_Drafting_12.00/ The revised code works like a charm in Drafting. I'll be trying it out on a few other files of mine, but I think it should be fine. Time-permitting, I'm going to see if I can make it work from within Annotation. Thanks again for sharing this code. It's greatly appreciated. |
#13
|
|||
|
|||
Re: Right Click Translation to DXF, IGES, etc.
John,
Can i do the same method for right click to print to PDF or MDI file ? What 's the command line to put ? Sam |
#14
|
||||
|
||||
Re: Right Click Translation to DXF, IGES, etc.
DXF, IGES, DWG can be created from mi files using an external application: the translators are standalone executables.
PDF and MDI can only be created from within Drafting. So that way, with a another startup.m file given on command line level (if possible) it might be possible, too, to create a PDF via right-mouse-click. But in this case you need a license AFAIK (for a few seconds). Wolfgang |
#15
|
||||
|
||||
Re: Right Click Translation to DXF, IGES, etc.
What is an MDI file? I have never heard of that format.
You can customize the standard right click Print to output PDF by modifying your <install-dir>\customize_p.m file. For more details see the "Plotting multiple drawings on Windows" section of the appendix.htm file under the Drafting install folder. As Wolfgang mentioned using this method might require brief access to a license. As an example, if you add the following lines to customize_p.m before the Start_plotting_process line at the bottom then right click printing will go to a PDF file rather than your default printer. INQ_ENV 0 PLOTTER_TYPE "PDF_GENERIC" PLOT_FORMAT "A" PLOT_DESTINATION ((INQ 304) + ".pdf") WIN_PRT_MGR ORIENTATION LANDSCAPE COPIES 1 END To define a new right click button to print to PDF would be more complicated. The right click Print of *.mi files that installs with Drafting uses a command of the form: <install-dir>\me10.exe -pelook 0 -p "%1" The essentially runs Drafting as a background process and automatically loads the contents of the customize_p.m file to set the print options then runs the Start_plotting_process macro. It is possible to start Drafting with with a command similar to this and have it load and run other macros and commands from other files, but that requires much more customization.
__________________
John Scheffel |
Currently Active Users Viewing This Thread: 1 (0 members and 1 guests) | |
Thread Tools | Search this Thread |
Display Modes | Rate This Thread |
|
|