API - how to give answer to pop-up window when running a macro

I have made a VB-routine that saves all files in a directory as e-drawings.

Problem is that on parts with configurations a pop-up window is displayed and I have to select which configurations to save.

I always want to save "all configurations" - so how do I provide that answer from my VB code?

Reply to
steve
Loading thread data ...

I havent seen a way IN SOLIDWORKS using VB code/SWX API, and while I suppose its possible to subclass any popup window, that method is edrw version/class specific, and you'll still have the window show up anyway.

The easiest way from outside of the SWX API is to tweak the registry. Ive done this to suppress the "select sheets" dialog when outputting EDRW files, and I just checked, and it also works for outputting EPRT files.

There are 2 reg settings: HKEY_CURRENT_USER\Software\eDrawings\SolidworksSaveOptions\Ask Configs HKEY_CURRENT_USER\Software\eDrawings\SolidworksSaveOptions\Ask Sheets

I obviously was using "Ask Sheets" and you obviously want "Ask Configs".

The 3 things to remember here are:

1) The settings get reset to "1" after any save, so the reg call must be made before EVERY save.

2) Saving as EITHER eprt or edrw resets BOTH settings to "1"

3) This works only if the box you are making the call from has the User rights to tweak this portion of the registry.

Good Luck.

Reply to
rocheey

PolyTech Forum website is not affiliated with any of the manufacturers or service providers discussed here. All logos and trade names are the property of their respective owners.