[ORD 10.11 C#] FeaturizedModelEntities removed from GeometricModel with the ORD 10.11 update?

looks like this was removed from the SDK with ORD 10.11. 

what should be the equivalent use?

Also is there a doc anywhere that mentions these kinds of changes with these updates. I know the ProjectWise SDK documentation adds notes about calls being deprecated and then leaves them in there for a couple years to give developers time to update their code. This is not the first time this has happened to me with the ORD SDK. a previous update added an additional parameter to a different sdk call.  

...
GeometricModel sdkGeomModel = conConn.GetActiveGeometricModel();
if (sdkGeomModel != null)
{
    foreach (FeaturizedModelEntity curFD in sdkGeomModel.FeaturizedModelEntities)
    {
    ...
    }
}
...

Parents
  •  , Please try the below Code snippet:

    }

    ConsensusConnectionEdit conConn = ConsensusConnectionEdit.GetActive();
                GeometricModel sdkGeomModel = conConn.GetActiveGeometricModel();
                //get all aligmnets from model
                IEnumerable<Alignment> alignments = sdkGeomModel.Alignments;
                foreach (Alignment alignment in alignments)
                    {
                    if(alignment != null)
                        {
                        //get LongSectionSpace of alignment
                        LongSectionSpace lss = alignment.LongSectionSpace;
                        if(lss != null)
                            {
                            foreach (var featurizedModelEntity in lss.FeaturizedModelEntities)
                                {
    
     
    
                                }
                            }
                        }
                    }

    Answer Verified By: John Drsek 

  • Shashank,

    thanks for the reply,

    i guess i should have mentioned that what my code was doing was finding all the node and conduit entities in the model. it looks like with your suggestion the model would have to have an alignment which might not always be the case. and looks like the entities must be within the limits of the alignment as well??

    i did try this code and it is finding the nodes and conduits but i think it's not a full proof solution. Could you clarify if my above assumptions are correct??

    been digging around in the SDK and i did figure out this below code. but the SDK help docs dont include anything on the Subsurface stuff... is there another .chm help doc somewhere that i missed for the subsurface side of the SDK.

    i did manage to figure this out..which is enough to fix my problem. but it is misleading that to get the subsurface model you use the create method. at first glance i would have thought that would create the subsurface model in the file, which i still need to check that it wont do that if the file doesnt have one created yet. but was expecting a getActiveSubsurfaceModel() command or something... anyways ill end my rant...

    GeometricModel sdkGeomModel = conConn.GetActiveGeometricModel();
    if (sdkGeomModel != null)
    {
        Bentley.Civil.Subsurface.SDKNet.SubsurfaceModel sueModel = Bentley.Civil.Subsurface.SDKNet.SubsurfaceModel.Create(sdkGeomModel);
        IEnumerable<Bentley.Civil.Subsurface.SDKNet.Link> Links = sueModel.GetLinks();
        IEnumerable<Bentley.Civil.Subsurface.SDKNet.Node> Nodes = sueModel.GetNodes();
    }

Reply
  • Shashank,

    thanks for the reply,

    i guess i should have mentioned that what my code was doing was finding all the node and conduit entities in the model. it looks like with your suggestion the model would have to have an alignment which might not always be the case. and looks like the entities must be within the limits of the alignment as well??

    i did try this code and it is finding the nodes and conduits but i think it's not a full proof solution. Could you clarify if my above assumptions are correct??

    been digging around in the SDK and i did figure out this below code. but the SDK help docs dont include anything on the Subsurface stuff... is there another .chm help doc somewhere that i missed for the subsurface side of the SDK.

    i did manage to figure this out..which is enough to fix my problem. but it is misleading that to get the subsurface model you use the create method. at first glance i would have thought that would create the subsurface model in the file, which i still need to check that it wont do that if the file doesnt have one created yet. but was expecting a getActiveSubsurfaceModel() command or something... anyways ill end my rant...

    GeometricModel sdkGeomModel = conConn.GetActiveGeometricModel();
    if (sdkGeomModel != null)
    {
        Bentley.Civil.Subsurface.SDKNet.SubsurfaceModel sueModel = Bentley.Civil.Subsurface.SDKNet.SubsurfaceModel.Create(sdkGeomModel);
        IEnumerable<Bentley.Civil.Subsurface.SDKNet.Link> Links = sueModel.GetLinks();
        IEnumerable<Bentley.Civil.Subsurface.SDKNet.Node> Nodes = sueModel.GetNodes();
    }

Children
No Data