will or how to delete files automatically after pack & go
will or how to delete files automatically after pack & go
(OP)
hello - will or how is solidworks able to automatically delete files thta have just been packed & go - is there a way to do this or is manually deleting the only waqy - any help would be greatly appreciated - thank you






RE: will or how to delete files automatically after pack & go
Having said that, maybe an API guru could develop a macro to compare folders and select the 'duplicates' for deletion.
RE: will or how to delete files automatically after pack & go
If I correctly understand your workflow is the following:
1) Open assembly
2) Create pack and go
3) Close assembly
4) Remove assembly files which were just packed in.
Please confirm. If that's correct please clarify what features of Pack-N-Go you are using (prefixes, zipping)? I can help with macro.
Regards,
Artem Taturevych
Application Engineer at Intercad
http://intercad.com.au/
Tel: +61 2 9454 4444
RE: will or how to delete files automatically after pack & go
Chris
SolidWorks 11
ctopher's home
SolidWorks Legion
RE: will or how to delete files automatically after pack & go
RE: will or how to delete files automatically after pack & go
1) Open the macro in edit mode (Tools->Macro->Edit)
2) You will see the following declaration under the macro header.
Const SOURCE_FILE As String = "C:\Input\Assem1.SLDASM"
Const DEST_FOLDER As String = "C:\Output\"
Const SUFFIX As String = "_test"
3) Specify the input file as first constant, output folder (may be the same as input folder) as second constant (you should include '\' at the end of path, and suffix to append to all file names. Save and run the macro.
Note no SolidWorks documents should be opened when macro running.
This should be executed very quickly because the references updated internally in file without opening in SolidWorks. When done message box is displayed.
Let me know if you have any questions or need some changes.
Hope it helps.
PLEASE BACKUP YOUR DATA WHEN TESTING THE MACRO!
Regards,
Artem Taturevych
Application Engineer at Intercad
http://intercad.com.au/
Tel: +61 2 9454 4444
RE: will or how to delete files automatically after pack & go
RE: will or how to delete files automatically after pack & go
Could you please attach the snapshot of an error and the line of macro it is thrown in?
Regards,
Artem Taturevych
Application Engineer at Intercad
http://intercad.com.au/
Tel: +61 2 9454 4444
RE: will or how to delete files automatically after pack & go
RE: will or how to delete files automatically after pack & go
RE: will or how to delete files automatically after pack & go
I'm sorry for that. It seems your assembly has no components. The error you are referring happens when the file has no external reference. Please try the attached macro.
Just for test can you try to run the macro on a simple assembly with one or two components (not virtual components)?
Regards,
Artem Taturevych
Application Engineer at Intercad
http://intercad.com.au/
Tel: +61 2 9454 4444