Community
Civil 3D Customization
Welcome to Autodesk’s AutoCAD Civil 3D Forums. Share your knowledge, ask questions, and explore popular AutoCAD Civil 3D Customization topics.
cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

How do you use pInBounds?

2 REPLIES 2
Reply
Message 1 of 3
Sinc
228 Views, 2 Replies

How do you use pInBounds?

I'm converting a user pick-point in a Profile View into station/offset, but how do I determine if the user picks inside or outside of the profile view?

Right now, I get a result either way. If the user picks outside the bounds of the Profile View, I still get a station and elevation, determined as if the Profile View grid were extended an infinite amount in all directions.

I tried declaring a variable of type "object pInBounds", and passing it in the command, as follows:

double sta, elev;
object pInBounds;
view.FindStationAndElevationAtXY(pickpoint.X, pickpoint.Y, out sta, out elev, out pInBounds);

But all I get with this is pInBounds==null, regardless of whether the user picks in bounds or out of bounds.

The docs say that pInBounds should be VARIANT_TRUE or VARIANT_FALSE. What does this mean in C# terms?
Sinc
2 REPLIES 2
Message 2 of 3
Anonymous
in reply to: Sinc

Looks like it is not implemented. I'm getting the same result in 2009 as
well.

I guess we need to use the MinElev, MaxElev, StationStart, StationEnd
properties to check if the pick point is within the profileview.


wrote in message news:5863885@discussion.autodesk.com...
I'm converting a user pick-point in a Profile View into station/offset, but
how do I determine if the user picks inside or outside of the profile view?

Right now, I get a result either way. If the user picks outside the bounds
of the Profile View, I still get a station and elevation, determined as if
the Profile View grid were extended an infinite amount in all directions.

I tried declaring a variable of type "object pInBounds", and passing it in
the command, as follows:
Message 3 of 3
Sinc
in reply to: Sinc

Yeah, that's what I ended up doing, and it seems to be a relatively effective workaround.
Sinc

Can't find what you're looking for? Ask the community or share your knowledge.

Post to forums  

Rail Community


 

Autodesk Design & Make Report