In 2009 I could instantiate the Cosmos/Simulation object using the code similar to this:
Dim SwApp As SldWorks.SldWorks
Dim cwApp As CosmosWorksLib.COSMOSWORKS
Dim cwAddin As CosmosWorksLib.CwAddincallback
Set SwApp = Application.SldWorks
Set cwAddin = SwApp.GetAddInObject("SldWorks.Simulation")
Set cwApp = cwAddin.COSMOSWORKS
Now, if I don't trap the error I get the following error on the last line.
"Run-time error '48': Error in loading DLL"
Does 2010 require a different string then "SldWorks.Simulation"? I tried searching the registry. It mentions a "SldWorks.Simulation.3", but that didn't work. Thanks for any help.