Afternoon,
I am creating Line objects, but having a stupid issue releasing them, so I can create another set later.
I create the objects no issue and name them lneGroup1, lneGroup2 ...... to remove them when I am done with them;
FOR EACH oObject IN thisform.ConArea.Objects
IF LEFT(oObject.Name, 8) = "lneGroup"
thisform.ConArea.RemoveObject(oObject.Name)
ENDIF
NEXT
It isnt removing all the objects that match the criteria in IF statement, if I have 4 it is only removing 2, so when I look to create them again with .NewObject later it tells me that I already have an object with that name.
I also tried it with;
FOR ox = 1 to thisform.ConArea.ControlCount
But this errors because ox ends up being greater than ControlCount which is reducing as I remove objects, am sure this is something stupid, and I have tried for a couple of hours and can not get a resovle.
There must be a simple way to remove all objects of a single type :-(
Darren
I am creating Line objects, but having a stupid issue releasing them, so I can create another set later.
I create the objects no issue and name them lneGroup1, lneGroup2 ...... to remove them when I am done with them;
FOR EACH oObject IN thisform.ConArea.Objects
IF LEFT(oObject.Name, 8) = "lneGroup"
thisform.ConArea.RemoveObject(oObject.Name)
ENDIF
NEXT
It isnt removing all the objects that match the criteria in IF statement, if I have 4 it is only removing 2, so when I look to create them again with .NewObject later it tells me that I already have an object with that name.
I also tried it with;
FOR ox = 1 to thisform.ConArea.ControlCount
But this errors because ox ends up being greater than ControlCount which is reducing as I remove objects, am sure this is something stupid, and I have tried for a couple of hours and can not get a resovle.
There must be a simple way to remove all objects of a single type :-(
Darren