SaveAs3 Method (IModelDoc2) return value enum?

I know SOLIDWORKS does not recommending using obsolete methods but I don’t understand why the parameters list and the return value is enum are wiped from the help page?

Does anyone know what enum is the return value?

That’s super annoying… Anyway, without testing, this would be my best guess.

http://help.solidworks.com/2019/english/api/swconst/SolidWorks.Interop.swconst~SolidWorks.Interop.swconst.swFileSaveError_e.html?id=223d0f90bf6c472181f6925ad2f5b3ab#Pg0

This enumeration goes back to 2010 on the selector in the corner so it’s been maintained/modified over the years. I’m guessing that it just happens to be used on the ModelDocExtension.SaveAs currently as well.

Edit: According to web archives, it looks like it’s been poorly documented from the beginning
2015 snapshot:
https://web.archive.org/web/20151127020704/http://help.solidworks.com/2012/english/api/sldworksapi/solidworks.interop.sldworks~solidworks.interop.sldworks.imodeldoc2~saveas3.html

When SaveAs3 executes correclty, the retval is 0. I wonder why swFileSaveError does not have a default 0 member.

I suspect it returns HRESULT (i.e. S_OK for 0)

BTW. You can see all the API versions of the help back to 2010

image

2 Likes