PDA

View Full Version : Old file Me10 without extension


ceste76
05-30-2003, 02:10 AM
Hello all,
I have a problem...
When I used Me10 Rev 8.7, or whatever following version with classic interface,I was not forced to save the files with extension....

Now I use OSD_Drafting MIXED UI and I load my file without extension; when I save it, a new file is saved with the same name and extension. mi

I have a copy of the original, and this causes confusion, because I can have three files with the same name, different extensions (.mi, .bi,...) and that are different.

Is there a way to convert them in automatic?
P.S. in my files I am also there file word, excell....

Thank's

bfisher
05-30-2003, 07:35 AM
Hi. I'm sure your problem is not unique, and my company also has a large number of legacy files stored without an extension. In the good old days of unix workstations ;) there was not an issue with file extensions except that it provided a means of sorting. I'd guess that most users, like myself, stored by default in compressed format to save disk space.

There are two ways to convert your filenames. The first and quickest is to write a dos batch file using the rename command that will process a list. (By processing a list you can manually exclude files that are not ME-10 files.) You could also use Visual Basic or some other language in a similar fashion. The second way, though somewhat slower, would be to write an ME-10 macro that would load files from a list and then store them to a new filename created by appending ".bi" or ".mi" to the name. The macro could also purge the original filename. Here's a quick version that will store to ".bi" format. I ran a simple test, so I think it will be OK, but you'll want to test it in your own system. To store as ".mi" format requires slightly different syntax in the store command as well as a change in the line that builds the new file name. Good Luck.

define change_2_bi
local list_file
local org_file
local new_file

let list_file ('files_2_cvt')
open_infile 1 list_file
loop
edit_part top
delete all confirm
read_file 1 org_file
load org_file
exit_if (org_file = 'END-OF-FILE')
let new_file (org_file+'.bi')
store all new_file {default is compressed format}
delete all confirm
purge_file org_file confirm
end_loop
close_file 1
end_define {change_2_bi}

Mike "the Rat"
05-30-2003, 07:44 AM
{Saves drawing without extension to 'M:\wyard\way-side'}

DEFINE Save_without_file_extension
LOCAL File_name
INQ_SELECTED_ELEM SELECT ALL CONFIRM
IF ((INQ 14)=0)
BEEP
DISPLAY 'The current file is empty. Can not stored file.'
ELSE
BEEP
READ "Enter the 'Drawing Number' To Put on Drawings." File_name
EDIT_PART '/'
RENAME_PART File_name
CURRENT_DIRECTORY 'M:\wyard\way-side'
STORE ALL DEL_OLD File_name
END_IF
END_DEFINE



{This does a quick save}

DEFINE Quick_save
LOCAL File_name
INQ_SELECTED_ELEM SELECT ALL CONFIRM
IF ((INQ 14)=0)
BEEP
DISPLAY 'The current file is empty. Can not stored file.'
ELSE
INQ_ENV 0
LET File_name (INQ 304)
STORE ALL DEL_OLD File_name
END_IF
END_DEFINE

I also written VB interface calling up the Windows Save Dialog Box. You can specify where to save and also you can add "Places" on the left side. :eek: