"In this case only 5% to 30% chance to detect already placed instances before placement."
I don't know from where you take this %.
You can use:
public bool InstanceExist(Document document, XYZ point)
{
FilteredElementCollector filteredElementCollector = new FilteredElementCollector(document).OfClass(typeof(Instance));
foreach (Instance instance in filteredElementCollector)
{
Element element = instance as Element;
Location loc = instance.Location;
LocationPoint locpoint = loc as LocationPoint;
if (locpoint.Point.IsAlmostEqualTo(point, 0.001))
{
return true;
}
}
return false;
}
it is importent to use IsAlmostEqualTo() in Revit for points.
-------------------------------------------------------------
--------------------------------|\/\/|------------------------
do not worry it only gonna take Autodesk 5 years to fix bug