Community Tip - You can Bookmark boards, posts or articles that you'd like to access again easily! X
Hello,
I would like to get rid of log files generated during dxf export.
I found a PROE discusion where there is a mapkey created for this purpose: mapkey(continued) @SYSTEMdel c:\\proe_dir\\*_dxf__out.*; but it does not work for me.
Also I dont know how to change the path to my current working directory.
the whole mapkey looks like following:
mapkey dxf @MAPKEY_NAMEExport do DXF;@MAPKEY_LABELDXF;\
mapkey(continued) ~ Command `ProCmdEnvHidden` 1;~ Command `ProCmdModelSaveAs`
mapkey(continued) ~ Open `file_saveas` `type_option`;~ Close `file_saveas` `type_option`;\
mapkey(continued) ~ Select `file_saveas` `type_option` 1 `db_137`;\
mapkey(continued) ~ Activate `file_saveas` `OK`;~ Activate `export_2d_dlg` `OK_Button`;\
mapkey(continued) ~ Activate `UI Message Dialog` `ok`;
mapkey(continued) @SYSTEMdel c:\\proe_dir\\*_dxf__out.*;
thanks for help in advance
T.
Solved! Go to Solution.
Tomas,
mapkey cannot work, because it removes files from c:\proe_dir directory.
Your working directory is c:\Users\hlavinka\Documents\473-4430\2, try the following mapkey.
mapkey ddd @MAPKEY_LABELDelete dxf logs;\
mapkey(continued) @SYSTEMdel c:\\Users\\hlavinka\\Documents\\473-44\
mapkey(continued) 30\\2\\*_dxf__out.*;
The mapkey is not universal !!!
Martin Hanak
Tomas,
mapkey ddd @MAPKEY_LABELDelete dxf logs;\
mapkey(continued) @SYSTEMdel c:\\proe_dir\\*_dxf__out.*;
ddd ... mapkey key sequence
c:\\proe_dir ... corresponds with c:\proe_dir (in mapkey you have to used doubled backslashes)
The length of mapkey line must not exceed 80 characters. If the path to your working directory is long, then you have to split second line into two ones.
Martin Hanak
Hi Martin,
I tried it and seems it does not work
Tomas,
mapkey cannot work, because it removes files from c:\proe_dir directory.
Your working directory is c:\Users\hlavinka\Documents\473-4430\2, try the following mapkey.
mapkey ddd @MAPKEY_LABELDelete dxf logs;\
mapkey(continued) @SYSTEMdel c:\\Users\\hlavinka\\Documents\\473-44\
mapkey(continued) 30\\2\\*_dxf__out.*;
The mapkey is not universal !!!
Martin Hanak
OK, now it works. Does it mean there is no other way except changing the path (c:\\Users\\hlavinka\\Documents\\473-44\) always when the working directory is changed?
thanks
The system window automatically opens up in the current working directory, so you should be able to eliminate the whole path part.
mapkey ddd @MAPKEY_LABELDelete dxf logs;\
mapkey(continued) @SYSTEMdel *_dxf__out.*;
It works!
on my PC it does not work 😞
Please upload config.pro containing mapkey. I can test it on my PC.
So I have doublechecked it and it really works, thanks wery much!
Hi Tom,
I am trying to do the same thing on our system. If I want to delete them in a subfolder of the working directory, could I do it with a line like this?:
mapkey(continued) @SYSTEMdel \\Subfolder\\*_dxf__out.*;
where Subfolder is the name of the working directory subfolder in which I always print out dxfs.
It would be very comfortable, because If I instead put the entire directory like "C::\\ etc etc" it wouldn't be universal and so not valid for all company users.
(I wouldn't try before knowing not to make damages).
thanks
Already solved!
for the interest who will end up in this topic...for me it works just by inserting this line:
mapkey(continued) @SYSTEMdel subfolder\\*_dxf__out.*;
where subfolder is the name of the working directory subfolder in which I want to delete del dxf_out files.
Same applies to steps log files:
mapkey(continued) @SYSTEMdel subfolder\\*__out.log.*;
There is a variable for the working directory that you can use in a mapkey, but I can't find it now. I saw it in an email from the old PTC User list, but I can't find it in my archives right now.
I think that when you call a system window, it opens in your working directory. So if you create a batch file that contains "del *_dxf__out.*", and call it from your mapkey, I believe it will operate in your working directory.
Tom & were typing at the same time. His method is simpler.