recording errors in API generated Parts
Posted: Fri Jun 14, 2024 7:54 am
Hola all
I'm putting together a macro that takes excel data and creates parts from a library of templates.
For the most part things are working, but I'd like to expand the error reporting somehow. I am logging errors I can predict (zero conditions, template not found, etc), but I'd like to be able to record & report errors that Solidworks has during modeling and drawing phases. I know there are a few conditions where the part gets made but for instance a sketch will have an error because of a dimension problem but the Part will save fine. But I'd like to know about those errors sooner rather than later because they mean bad input data that I don't currently have a filter for.
Parts are created with the swApp.NewDocument method using a Template name variable.
I'm not even sure what to search for in the API reference for modeling error flags. Any help would be appreciated in this!
Thanks
M
I'm putting together a macro that takes excel data and creates parts from a library of templates.
For the most part things are working, but I'd like to expand the error reporting somehow. I am logging errors I can predict (zero conditions, template not found, etc), but I'd like to be able to record & report errors that Solidworks has during modeling and drawing phases. I know there are a few conditions where the part gets made but for instance a sketch will have an error because of a dimension problem but the Part will save fine. But I'd like to know about those errors sooner rather than later because they mean bad input data that I don't currently have a filter for.
Parts are created with the swApp.NewDocument method using a Template name variable.
I'm not even sure what to search for in the API reference for modeling error flags. Any help would be appreciated in this!
Thanks
M