AutoCAD Map 3D Developer
Welcome to Autodesk’s AutoCAD Map 3D Developer Forums. Share your knowledge, ask questions, and explore popular AutoCAD Map 3D Developer topics.
cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

classified object

2 REPLIES 2
Reply
Message 1 of 3
El Haj
282 Views, 2 Replies

classified object

Anyone can hel me, please?
I'd like to know how to determine the class of an ObjectId (already classified from file). I select an object from the model space, and I want to know the class of this entity:

entity = transaction.GetObject(Objectid, OpenMode.ForRead)

any help?
2 REPLIES 2
Message 2 of 3
Anonymous
in reply to: El Haj

I have do admit that a lot needed APIs in Map's classification are missing.
It seems Feature Classification in AcadMap is just an interim stuff when
AcadMap incorporates Feature Data Object (FDO)/Feature Data Source (external
database), so that the Classification API does not change/emprove much after
4 new Map releases (from 2006 to 2009).

Anyway, for the seemingly easy task you want to do, it takes incredibly long
process (to write the code and to run) to achieve:

First, Call ClassificationManager.GetFeatureClassNames(), so that you obtain
a StringCollection of feature names;
Then, do this (pseudo-code):

string feature="Unknown";
foreach string featureName in featreNameCollection
{
ObjectIdCollection
entIds=ClassificationManager.GetClassifiedEntities(featureName, true/false)
foreach ObjectId id in entIds
{
If (id=MySelectedEnt.ObjectId)
{
//Finally, you find out what the entity is classified as
which feature.
feature=featureName;
break;
}
}
}


"El Haj" wrote in message news:5975643@discussion.autodesk.com...
Anyone can hel me, please?
I'd like to know how to determine the class of an ObjectId (already
classified from file). I select an object from the model space, and I want
to know the class of this entity:

entity = transaction.GetObject(Objectid, OpenMode.ForRead)

any help?
Message 3 of 3
El Haj
in reply to: El Haj

Thanks a lot, Norman. It works !
Really, it's an important lack in ACAD MAP. It takes too much run time, but we've not chance.

Can't find what you're looking for? Ask the community or share your knowledge.

Post to forums  

Autodesk Design & Make Report

”Boost