I am trying to use a macro to create a section view, and then access the bodies created by the section view. There is an example which explains exactly what I want to do, the only problem is that it doesn't actually work.
Here is the example I'm referring to: 2016 SOLIDWORKS API Help - Get Sectioned Bodies Example (VBA)
If I create a two macros, one which creates a section view, and another which access the sectioned bodies, and then run them each separately, it works as expected.
But when I try to do both in the same macro, it doesn't work. I'm assuming that there is a slight delay when applying .CreateSectionView, so when .GetSectionedBodies is called the sectioned bodies haven't been created yet. I also tried creating a macro that simply calls the other two macros, but again the .GetSectionBodies is still empty
Can anyone get this example working properly?
SolidworksApi macros