Hello.
I am trying to get all Surface Template element using C# SDK.
But I don't know how to get Surface Template element.
Is there any way to get all Surface Template element?
Thank you.
Try the code below.
Bentley.CifNET.SDK.Edit.ConsensusConnectionEdit sdkCon = Bentley.CifNET.SDK.Edit.ConsensusConnectionEdit.GetActive(); if (sdkCon == null) return; GeometricModel geomModel = sdkCon.GetActiveGeometricModel(); if (geomModel == null) return; // This is how you get the surface temapltes foreach (var s in geomModel.CorridorSurfaces) { }
I hope it helps.
Henrique
I tried the code you suggested.
I think CorridorSurfaces have all of Corridors and LinearTemplates and SurfaceTemplates.
How can I detect if CorridorSurface is SurfaceTemplates?
if (s.Corridor == null ) { // It is a surface template }
Thank you so much.