I'm having an issue now with LOW MEM and I believe it could be something with my code, like I'm not setting objects back to nothing or I'm supposed to save something out?
This is just an idea since if I get the message and close ArcPad - saving out the map, then upon reopening it works fine...for a while until it happens again. Like a cache is getting full and needs clearing...
Here's the code, which was put together based on other threads (thank you!)
Dim dblX, dblY, objToolButton, blnLyrExists, strLayer
'Get a reference to the tool button object
Set objToolButton = ThisEvent.Object
'Initialize blnLyrExists flag to False
blnLyrExists = False
'If layer exists, set the blnLyrExists flag to true
For Each objLyr in Map.Layers
If StrComp (objLyr.Name, "ST", 1) = 0 Then
blnLyrExists = True
strLayer = "ST"
'If layer does not exist:
'Notify the user, return the tool button to its original state, and exit.
If Not blnLyrExists Then
MsgBox "The layer is not present in the current map.", vbExclamation, "Layer not present"
'If the layer does exist:
'Get the coordinates of the map where the user clicked
dblX = Map.PointerX
dblY = Map.PointerY
'Get a reference to the Layer object
Set objLayer = Map.Layers("ST")
'If the layer can be made editable, make it editable
If objLayer.CanEdit Then
objLayer.Editable = True
'Add a new tree (point feature) at the clicked location
'Return the tool button to its original state