b0br0ff
Зарегистрирован: 22.05.2009 Сообщения: 22
|
Добавлено: Чт Авг 12, 2010 9:59 am Заголовок сообщения: Удаление объекта из косметического слоя |
|
|
Доброе время суток! Заранее спасибо за помощь!
Рисую в слое вот таким макаром:
Sub DrawObjectInCosmeticLayer(some_object AS Object)
OnError Goto Except_handler
DIM map_win_id AS Integer
map_win_id = FrontWindow()
'Insert the object into the map's Editable layer, or the Cosmetic layer
if MapperInfo( map_win_id, MAPPER_INFO_EDIT_LAYER)<>-1 then
Insert Into LayerInfo(map_win_id,
MapperInfo(map_win_id, MAPPER_INFO_EDIT_LAYER),
LAYER_INFO_NAME)
(Object) Values (some_object)
'Note "MapperInfo( map_win_id, MAPPER_INFO_EDIT_LAYER)<>-1"
Else
' Insert the line object into the map's Cosmetic layer
Insert Into WindowInfo(map_win_id, WIN_INFO_TABLE) (Object) Values (some_object)
Set Map Window map_win_id Layer 0 Editable Off
' Note "NOT MapperInfo( map_win_id, MAPPER_INFO_EDIT_LAYER)<>-1"
End if
Except_handler:
If Err()<>0 Then
Note "Error code (DrawObjectInCosmeticLayer): " + Err() + ", " + Error$()
End If
End Sub
Удалить всё тоже не проблема:
Sub ClearCosmeticLayer()
OnError Goto Except_handler
DIM iWin AS Integer
iWin = FrontWindow()
If iWin Then
Delete From WindowInfo(iWin, WIN_INFO_TABLE)
End If
Except_handler:
If Err()<>0 Then
Note "Error code (ClearCosmeticLayer): " + Err() + ", " + Error$()
End If
End Sub
А вот каким макаром удалить последний вставленный объект (линия)? Я так понимаю, что со слоем можно работать как с таблицей ... а как узнать rowid вставленного объекта? |
|