theGreg:
I tried dropping the LineStringElement, but it always says " Nothing to drop"
A Line String Element is, in MicroStation terms, a primitive element, so by default it thinks there's nothing to drop. Brien's response tells you what to do as a MicroStation user.
theGreg:
I want to find a way to do this programatically
If Brien's suggestion isn't an answer that you can use, then tell us more precisely what you need.