I want to show how an assebly fits together by sectioning only one (or a few) parts of an entire assembly while leaving the others intact.
I would like to do this in an assembly, not in a drawing with a broken-out section.
Welcome to SW forums Adam.
Not sure how to do this with API but in assembly create a cut extrude feature and select the parts you want to get affected to get the broken section behavior via Feature Scope in Assembly
You might also find this post helpful for your future reference
Welcome to the forum.
You can draw a section line through only part of the assembly
and use the section scope to remove certain parts form the section view, but only in a drawing.
Is this what you are talking about?
What you want cannot be done in the assembly. You will have to do it on a drawing
Create a new configuration
Insert > Assembly Feature > Cut > Extrude
Select a plane or surface
Create a suitable sketch ... all encompassing or partial is fine ... and Exit Sketch
Expand the Feature Scope section and select the Selected Components option (make sure Auto-select is not selected)
Select the components to be sectioned
Select the Green tick or hit Enter
... and you should have a partially sectioned assembly which can then be referenced in a drawing.
The downside to this method is having to add Hatching to the cut faces (if needed) manually.
Retrieving data ...