I have a lot of troubles with early binding recently. I get either corrupted macros, or solidworks crash.
either way, I cannot open or edit my macros at all.
I had to open the macro with other versions of solidworks, and uncheck all the references. save.
then I can open my macros.
after a while it may corrupt again.
I moved from early binding to late binding to avoid checking boxes in reference.
'for the program, it is pretty clear I can do this.
dim swApp as object
swApp = CreateObject("SldWorks.Application")
but how do i bind a model to ModelDoc2, and ModelDocExtion?
tried CreateObject("ModelDoc2.SldWorks") CreateObject("ModelDoc2.Application") and all combinations.
VBA told me, i cannot create object in ActiveX.
Could anyone brief me where I can get the strings for CreateObject method, and how I can bind to objects other than SldWorks.Application.