Run PowerSelect Example (VBA)
This example shows how to initialize, run, and close a PowerSelect session
using the SolidWorks Utilities API.
' Get the SolidWorks Utilities interface
Set swUtil = swApp.GetAddInObject("Utilities.UtilitiesApp")
Set swUtilPowerSelect = swUtil.GetToolInterface(gtSwToolPowerSelect)
' Initialize PowerSelect
errorcode = swUtilPowerSelect.Init()
' Set the types of entities to select
errorcode = swUtilPowerSelect.SetSelectEntititesTypes(TRUE,
FALSE,
FALSE,FALSE)
' Set the Edge convexity filter
errorcode = swUtilPowerSelect.SetEdgeConvexityFilter(TRUE,
FALSE,
FALSE)
' Run PowerSelect
EntityCounts = swUtilPowerSelect.RunPowerSelect(FALSE,
longstatus)
' Select the PowerSelect results
errorcode = swUtilPowerSelect.SelectResults()
' Close this PowerSelect session
errorcode = swUtilPowerSelect.Close()