I wrote C# Add-in using the function "RunThinAnalysis2" of "SolidWorks Utilites"
gtcocswUtilities swUtil = (gtcocswUtilities)this.theiSwApp.GetAddInObject("Utilities.UtilitiesApp");
if (swUtil != null)
{
gtcocswThicknessAnalysis swThicknessAnalysis = swUtil.ThicknessAnalysis;
int status = swThicknessAnalysis.Init();
int errorValue = swThicknessAnalysis.RunThinAnalysis2(minValue / 1000.0,
(int)gttckResolutionOptions_e.gttckHighResolution,
(int)gtResultOptions_e.gtResultSaveReport,
pathFolderThickness,
true,
true,
true);
}
This add-in is built up as a dll file, and it works well in SolidWorks
Now, there is a new issues that I need to use another standalone program to wake up Solidworks and this addin
string SwLoaderPath = ".\\sldutils\\SwLoaderSw.dll";
string addinLocation = System.Windows.Forms.Application.StartupPath + "\\ThicknessAndSectionAnalysis.dll";
long result2 = swApp.LoadAddIn(SwLoaderPath);
long result1 = swApp.LoadAddIn(addinLocation);
But every time when Solidworks is waken up,the "SolidWorks Utilities" is not active, and I have to turn on this option manually before using my Addin.
Is there any method to active "SolidWorks Utilities" using C# Solidworks API?