I think it is possible to do using AutoCAD Property Inspector API.
Another way is to involve Plant SDK, which intoduces classes like Pipe, Vessel etc. in addition to AutoCAD classes.
You can find more information and download Plant SDK here:
There is a blog post regarding entities in the Ortho view: