Greetings,
I'm wondering how exactly you add an Classification to an Space Object(and by Classification i mean the part under Space object properties>Extended Data>Classifications where normally the SIS one is located).
I'm trying trough .NET (C# to be specific) to change the information on a space with something from the ClassificationDefenitions specified in the drawing. I'm able to read the data from the current ones, however if any of the classifications is using the Default(By style) value the space.ClassficationCollection doesn't contain that particular Classification.
In the document i've got a classificationdefinition for spaces called "Spacefunction" and an assorted list of various functions the space itself can be assigned, like Elevetor-shaft, Bathroom/Shover etc.
Anyone that can possibly help to provide with a code sample on how to do this or tell if it's impossible to do, i'd be happy to hear since i'm not able to figure out what i'm doing wrong. Sample below show on how i'm currently getting the information on the space:
Entity ent = (Entity)tr.GetObject(Objectid, OpenMode.ForWrite);
//Space
Autodesk.Aec.Arch.DatabaseServices.
Space sp = ent as Autodesk.Aec.Arch.DatabaseServices.Space;
Autodesk.Aec.DatabaseServices.ClassificationCollection coll = sp.Classifications;
List<ObjectId> classificIds = newList<ObjectId>();
foreach (ObjectId cObjId in sp.Classifications)
{
classificIds.Add(cObjId);
Autodesk.Aec.DatabaseServices.
Classification c = tr.GetObject(cObjId, OpenMode.ForWrite) as Autodesk.Aec.DatabaseServices.Classification;
MessageBox.Show(String.Format("{0} - {1}", c.OwningSystemName.ToString(), c.NameAndDescription.ToString()));
}
The code above just shows the classifications that are not using default values.
Software i'm working with is: Autodesk Autocad MEP 2012
Regards
Claes
Hi
Could you please re-post or link your question under one of the AutoCAD Architecture products:
http://forums.autodesk.com/t5/AutoCAD-Architecture/ct-p/56
As the question is specific to the MEP API, you will have more chances to get an answer.
Sorry for the hassle.
Regards,
Philippe.
Can't find what you're looking for? Ask the community or share your knowledge.