I'm experienced in programming but relatively new to the SW API. I'm trying to write a macro to perform an area analysis on a part; it should take sections stacked in the X direction but at various angles and write the area of each cross section to a text (.csv) file. I've attached an example body and a macro taking the sections I mean.
The two methods I know for doing this by hand are:
- using a series of Section Views and the Measure tool on the sectioned face(s)
- creating a Reference Plane and an intersection sketch, then using Section Properties to get the total area of that sketch
I'm having trouble implementing these in code, however. In the first case I'm stuck on selecting the section face(s) to apply Measure.Area, and in the other I can't find any way to call Section Properties from the API.
Any tips or advice would be welcome, but I'm especially wondering if there's a more macro-oriented method to accomplish this.