Message 1 of 4
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report
Hi,
I'd like to get types (or at least normal names) from string collection Autodesk.Aec.PropertyData.DatabaseServices.PropertySetDefinition.AppliesToFilter.
I have no idea how to convert "AcDb3dSolid, AcDbSurface, AeccDbSurfaceTin, AcDbFace, AcDbBody, AcDb3dPolyline, AeccDbFeatureLine, AeccDbAlignment, AeccDbVAlignment ..." to types Autodesk.AutoCAD.DatabaseServices.Solid3d, TinSurface, Alignment, etc.
I've tried RXObject and RXClass but they don't have methods with string.
Reflection won't help because AcDbs are internal structs. Neither removing substrings "AcDb" or "AeccDb" and trying to get the type from the assembly works.
public static void GetPropertySets(Entity ent, Transaction tr)
{
ObjectIdCollection psdColl = PropertyDataServices.GetPropertySets(ent);
foreach (ObjectId objId in psdColl)
{
PropertySet ps = objId.GetObject(OpenMode.ForRead) as PropertySet;
ObjectId idDef = ps.PropertySetDefinition;
PropertySetDefinition propSetGroup = (PropertySetDefinition)tr.GetObject(idDef, OpenMode.ForRead);
foreach (string obj in propSetGroup.AppliesToFilter)
{
// get type from stirng??
}
}
}
Thanks for help.
Michal
Solved! Go to Solution.