trying to find in the SDK how do loop through the point features within a fieldbook.
searching the sdk i cant find anything. but its there in vba. SurveyProject.FieldBooks(1).PointFeatures.
but not seeing anything in the sdk. is this something only available in the COM library??
JD
The new SDK available through ,NET C# or C++ does not reflect the previous VBA COM layer 1 to 1. As you noticed, there is not an API to search through survey field books. However, you can loop through all the elements in a model and determine if one is a survey point or a survey linear feature.
Here is a code snippet.
using (Bentley.CifNET.SDK.ConsensusConnection con = new CifNET.SDK.ConsensusConnection(CurrentModel)) { foreach (DgnPlatformNET.Elements.Element elem in CurrentModel.AsDgnModel().GetElements()) { Bentley.SurveyNET.SDK.SurveyPoint sp = Bentley.SurveyNET.SDK.SurveyPoint.CreateFromElement(elem); Bentley.SurveyNET.SDK.SurveyChain sc = Bentley.SurveyNET.SDK.SurveyChain.CreateFromElement(elem); Bentley.CifNET.GeometryModel.SDK.FeaturizedModelEntity fme = null;
if (sp != null) {
this element is a survey point
Answer Verified By: John Drsek
thanks, that works.
is this not documented in the SDK doc? I did a search for *SurveyPoint* and got no results.