Using the .NET API I get the ObjectIdCollection of the sites in a drawing like so:
ObjectIdCollection sites = civDoc.GetSiteIds();
I then loop through them to delete the sites (all featurelines, parcels and alignments have already been deleted from the drawing):
foreach (ObjectId id in sites)
{
Site site = (Site)id.GetObject(OpenMode.ForWrite);
site.Erase();
}
which throws the "eNotApplicable" exception. Is there no way to remove a Site using the .NET API? Using COM it was simple enough to just use the Remove(i) method on the Sites collection, and I would do this with late binding, except I cannot find a way to get the AcadObject of the CivilDocument or Sites collection. Any advise on how to get these would be great!
Jeff -
I will look into this.
Thanks,
Partha
Hi Jeff,
I could reproduce this and I have logged it as a change request to be addressed by our engineering team in the coming days.
Happy New Year !
Thanks,