Check whether a rebar is perpendular or parallel to view

How do i do this check to see whether my rebar is parallel to view or perpendicular to view

Eg - if its perpendicular to view then it will prompt to open section/Elevation views.
- if its parallel to view it will allow us to edit sketch in current view itself

So how does this check happen thru the API? Any specific method?