Is there a subroutine/function that will get the instance angles and radius data from a selected circular pattern? I have not found an object and method that will extract that data for me. Thank you - Dave
I don't know what you mean by "radius", but here is how to get the instance angles using ICircularPatternFeatureData. Select a circular pattern feature in the feature tree, run the macro, then inspect the immediate (debug) window.
Dim swApp As SldWorks.SldWorks
Dim swModel As SldWorks.ModelDoc2
Dim swSelMgr As SldWorks.SelectionMgr
Dim swFeat As SldWorks.Feature
Dim swData As SldWorks.CircularPatternFeatureData
Set swApp = Application.SldWorks
Set swModel = swApp.ActiveDoc
Set swSelMgr = swModel.SelectionManager
Set swFeat = swSelMgr.GetSelectedObject6(1, -1)
Set swData = swFeat.GetDefinition
swData.AccessSelections swModel, Nothing
Debug.Print "Total instances: " & swData.TotalInstances
Debug.Print "Angle: " & Round(swData.Spacing * 180 / (4 * Atn(1)) / swData.TotalInstances)
SolidWorks API Training and Services
Thank you Keith for your response. What I meant by "radius" was the distance between the center of axis and an instance position. -Dave
That value, as far as I know, isn't available in the GUI let alone the API. That would be a chore to write.
SolidWorks API Training
I had that feeling. Thank you for your help.
Retrieving data ...