Mass edrawing generation

Hello

I'm looking for a macro to bulk generate eDrawings files of all my assemblies in EPDM at night.
I would come and select a folder, and it would open all the SLDASM files one by one to make an eDrawing of each configuration, save it to a specific folder with the name of the configuration each time, and then close it and move on to the next one.

I tried the SW Task Scheduler, but it doesn't take into account configurations, and it took more than an hour to make only 7 SLDASM files in a folder (because it opens everything all of a sudden, doesn't do one by one, and it saturates).

1 Like

Good evening

It should be possible to start from the code on this page: Save assembly as eDrawing with all configurations - SOLIDWORKS / API/VBA Macros - cadoverflow
On the other hand, you have to plan for a SW closure from time to time and a restart because by macro the memory does not empty when closing the files.
With each ASM opened, the amount of memory occupied increases and it ends up crashing once you have saturated it (I paid the price on a macro that opened asm and drw).

Hello

Otherwise I hadn't paid attention to the fact that it's in Solidworks PDM.
Wouldn't a task started in the evening before leaving be easier?
There is a task of converting to different file formats including Edrawings.
The advantage lies in the fact that the vault better manages the closure of SW and the liberation of memory (from memory the task closes SW after each processed file but would have to retest).
It's set up in the administration:

3 Likes

Hello
What supplements do you use? because I don't see conversion parameters in my tasks...
image

Hello

These are the tasks installed by default. The only custom one in my interface is " STEP Conversion".
You must go to the C:\Program Files\SOLIDWORKS Corp\SOLIDWORKS PDM\Default Data folder to retrieve the default settings.
Convert_gb.cex

1 Like

I just found it, it's perfect, but the problem is that when I launch the task on a file, it makes me the parts, plans and assembly... Isn't there a trick so that it only does the assembly in the task when I select a folder? (without having to select my assemblies one by one)
image

Or it's in the script that you have to fiddle with to get only the sldasm, but that's out of my skills :joy:

conver.txt script (43.4 KB)

I did it for the step, I'm looking at it this lunchtime and provided the modified script to take only the asm

2 Likes

Great, thank you so much

Hello! If it helps, there is the Integration module in the mycadtool tools that allows mass registration in easm:
image

1 Like

Hello
Unfortunately I don't have a mycadtool license

Re

Attached is the script that will only take ASMs even if the selected conversion type is Edrawings (*.eprt; *.easm; *.edrw)
Script convert.txt (43.4 KB)

3 Likes

Thank you, I just did the test, it works it doesn't take into account the sldprt and slddrw, but because against it takes into account the step files. He opens them and transforms them into EPRT.

I'll check, I don't have a step in my trunk

Corrected normally.
Script convert V2.txt (43.4 KB)

2 Likes

It works. Thank you very much

1 Like