Delete a vertical alignment
To delete an existing vertical alignment. The code snippet below shows how the profile element is deleted from current dgn.
Example
internal void DeleteVerticalAlignment(Profile profile)
{
//Get Element from profile
Bentley.DgnPlatformNET.Elements.Element element = profile.Element as
Bentley.DgnPlatformNET.Elements.Element;
if (element != null)
{
//Delete profile
element.DeleteFromModel();
}
}
The code deletes the profile by converting profile element to
Element object. Element.DeleteFromModel() used here for deleting. The profile
here should have a valid DgnModel here and connection should be of type
ConsensusConnectionEdit.