I did check it with RevitLookup and it looks to me that in relation to the .Net classes nothing changed in Revit 2023 compared to 2022 - except that that base "AnalyticalModel" class became 'internal'
For a little background:
As you know - every structural element in Revit come with its own Analitycal Element. See the attached "AM-beam1.png" - for the beam and its AnalyticalModelStick.
The Revit 2022 Api docs list the hierarchy as: (haven't found the 2023 api docs yet 😞
System Object
Autodesk.Revit.DB.Element
Autodesk.Revit.DB.Structure.AnalyticalModel
Autodesk.Revit.DB.Structure.AnalyticalModelStick
Autodesk.Revit.DB.Structure.AnalyticalModelSurface
RevitLookup, for both 2022 and 2023) only shows the hierarchy up to AnalitycalModel (See attached AM-Beam2.png)
If you create in Revit a Schedule that includes the beams in your project - and then use the schedule to highlight all the beams contained, Revit will select/highlight only the beams without their 'analytical model' representation.
Doing it through the API such a selection would be equivalent to:
var scheduleElements = new FilteredElementCollector(_doc, schedule.Id).ToList();
The problem with this is that this will return TWO elements, the beam and its corresponding Analytical Model.
To filter out the analytical model Element one would use:
var scheduleElements = new FilteredElementCollector(_doc, schedule.Id).Where(p => !(p is AnalyticalModel)).ToList();
As I've said before, the problem is that in Revit 2023 the AnalyticalModel class became internal
// Decompiled with JetBrains decompiler
// Type: AnalyticalModel
// Assembly: RevitAPI, Version=23.0.0.0, Culture=neutral, PublicKeyToken=null
// MVID: 3F119BED-4E20-487E-A28B-0FE14139ED62
// Assembly location: C:\Work\MdskProducts\BIMrx_2\Microdesk.BIMrx_2\Product\Source\Lib\Revit\2023\RevitAPI.dll
using System;
using System.Runtime.CompilerServices;
using System.Runtime.InteropServices;
[NativeCppClass]
[StructLayout(LayoutKind.Sequential, Size = 224)]
internal struct AnalyticalModel
{
....
}
So the question remains: How can we deal with analytical elements in the Revit 2023 api?
Specifically how can we filter them out from the results of an ElementCollector ?
Thanks for your attention.