This post will show how to add the capability to swap parts in a profile view to the Swap Parts command in the Civil 3D Reminders Pack, see the previous post here. The code addition is pretty small. All that is needed is to check to see if the selected entity is a ProfileViewPart and if it is convert the entity to the corresponding pipe or structure entity. The code then runs like it did before.
' Add code to support profile view parts
If TypeOf ent Is Autodesk.Civil.PipeNetwork.DatabaseServices.ProfileViewPart Then
' Convert the profile view part to it's corresponding pipe or structure part.
Dim oProfileViewPart As Autodesk.Civil.PipeNetwork.DatabaseServices.ProfileViewPart
oProfileViewPart = ent
ent = DirectCast(tr.GetObject(oProfileViewPart.ModelPartId, OpenMode.ForWrite), Entity)
Add the code right before it checks to see if the ent is a Pipe.