I am writing a function with following code.
public static ObjectId PickAnEntity(string msg, string rejectMsg, Type [] entType)
{
PromptEntityOptions pEo = new PromptEntityOptions(msg);
pEo.SetRejectMessage(rejectMsg);
foreach(Type type in entType)
{
pEo.AddAllowedClass(type, true);
}
PromptEntityResult pEr = HelperClass.GetEditor().GetEntity(pEo);
if (pEr.Status == PromptStatus.OK)
{
return pEr.ObjectId;
}
else
{
return new ObjectId(0);
}
}
Now if selection status is OK I return the object id but in case of some problem (such as if ESC is pressed) what value to
return from else portion. If I return { return new ObjectId(0); } I get following message which I do not understand
completely.
'Autodesk.AutoCAD.DatabaseServices.ObjectId.ObjectId(int)' is obsolete: 'Use ObjectId(IntPtr)'
Please Guide.
Thanks.