Example: Create a custom section shape based on an NGon:
In the Perspective viewport, create a line and a six-sided NGon.
Apply the Sweep modifier to the line.
The line takes on the shape of an angled extrusion.
Click the Use Custom Section radio button.
The line displays as a line again.
Click the Pick button in the Custom Section Types group and choose the NGon in the viewport.
The hexagonal shape is swept along the line's length.