I thinking that Dynamo translated internal software’s geometry to itself type - to working with them in Dynamo’s interface (as Dynamo’s objects) and in some situations you will not getting same results as in Dynamo’s node selection’s result.
That post uninformated… please, add more info about types that you want getting and, of course, software - revit/civil/etc …
import sys
import clr
import System
clr.AddReference('ProtoGeometry')
from Autodesk.DesignScript.Geometry import *
clr.AddReference('RevitAPI')
import Autodesk
from Autodesk.Revit.DB import *
import Autodesk.Revit.DB as DB
DBtypes = []
dictDBtypes = {}
for a in System.AppDomain.CurrentDomain.GetAssemblies():
if a.GetName().Name == 'RevitAPI':
types = a.GetTypes()
for spce in types:
if spce.IsSubclassOf(DB.Element):
DBtypes.append(spce)
dictDBtypes[spce.Name] = spce
break
DBtypes = sorted(DBtypes, key = lambda x : str(x.FullName))
OUT = dictDBtypes