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: 

Any samples of "FindStationAndElevationAtXY()" method?

2 REPLIES 2
SOLVED
Reply
Message 1 of 3
joantopo
492 Views, 2 Replies

Any samples of "FindStationAndElevationAtXY()" method?

C#

public bool FindStationAndElevationAtXY(
	double x,
	double y,
	ref double station,
	ref double elevation
)

I don´t understand this method. API documentation says that "Finds the station and elevation values at the given X,Y coordinate." but this method return a bool value.

I don´t understand neither "ByRef".

 

Any samples please?

 

Thank you.

Autocad C3D 2019 SP3, 2020 & 2021
Intel I9 9900K with frontal watercooler alphacool eisbaer 360 (original fans mounted in pull)- 3 fans Corsair 120 ML PRO in push.
MOBO Gygabyte Z390 Aorus Master- Corsair RGB Vengeance 64GB RAM (4x16) CL16
Nvidia Quadro RTX 4000
Samsung 970 EVO PLUS 1TB (unit C). Samsung 970 PRO 512GB (for data)
Power Supply: Corsair TX850M PLUS


Descubre mi programa VisorNET para Civil 3D:
https://apps.autodesk.com/CIV3D/es/Detail/Index?id=appstore.exchange.autodesk.com%3avisornet_windows32and64%3aes
2 REPLIES 2
Message 2 of 3
joantopo
in reply to: joantopo

   Point3d pt = ed.GetPoint("\nClicka un punto sobre la visualización del perfil: ").Value;
                double elevacion=0;
                double pk=0;
                 pv.FindStationAndElevationAtXY(pt.X, pt.Y, ref pk, ref elevacion);

 

Autocad C3D 2019 SP3, 2020 & 2021
Intel I9 9900K with frontal watercooler alphacool eisbaer 360 (original fans mounted in pull)- 3 fans Corsair 120 ML PRO in push.
MOBO Gygabyte Z390 Aorus Master- Corsair RGB Vengeance 64GB RAM (4x16) CL16
Nvidia Quadro RTX 4000
Samsung 970 EVO PLUS 1TB (unit C). Samsung 970 PRO 512GB (for data)
Power Supply: Corsair TX850M PLUS


Descubre mi programa VisorNET para Civil 3D:
https://apps.autodesk.com/CIV3D/es/Detail/Index?id=appstore.exchange.autodesk.com%3avisornet_windows32and64%3aes
Message 3 of 3
Partha.Sarkar
in reply to: joantopo

Hi,

 

I think the API Ref document has very clear explanation on this :

 

public bool FindStationAndElevationAtXY(  double x,  double y,  ref double station,  ref double elevation )

 

Parameters

x Type: System.Double

The X coordinate in the profile view's coordinate system.

 

y Type: System.Double

The Y coordinate in the profile view's coordinate system.

 

station Type: System.Double

Returns the corresponding station.

 

elevation Type: System.Double

Returns the corresponding elevation.

 

I see you already resolved it, however, any feedback to us to improve the API documentation is always welcome !

 

Cheers,

Partha



Partha Sarkar
Developer Technical Services
Autodesk Developer Network

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

Post to forums  

Rail Community


Autodesk Design & Make Report