Message 1 of 2
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report
Im facing another problem too
line 289 shoots an error
in the exception user-Unhandled box it says this:
Name Value Type
| ▶ | $exception | {"Unable to cast object of type 'Autodesk.AutoCAD.EditorInput.SelectedObject' to type 'Autodesk.AutoCAD.DatabaseServices.Entity'."} | System.InvalidCastException |
whats strange is I used the same method a few lines above which is not included in the screen shot.
this is what i wrote and passed it without error:
PromptSelectionResult psr2 = ed.SelectAll();
if (psr2.Status==PromptStatus.OK)
{
SelectionSet selall = psr2.Value;
...
}
Edit:
I also noticed my code wont hide entities:
foreach (ObjectId obj in objallID)
{
Entity ent = trs.GetObject(obj, OpenMode.ForWrite) as Entity;
ent.Visible=false;
}
Autodesk.AutoCAD.Internal.Utils.FlushGraphics();
Solved! Go to Solution.