Официальный сайт геоинформационной системы (ГИС) ObjectLandОфициальный сайт геоинформационной системы (ГИС) ObjectLand
  
 
ПОИСК ПО САЙТУ:
yandex.ru
КАРТА САЙТА
 
главная / поддержка / форум
E-MAIL:ПАРОЛЬ: 
регистрация

Обсуждение

 Рисуем сетку, а ее не видноРисуем сетку, а ее не видно [ SerjUfa ]
Понедельник, 16 сентября 2002, 11:59

Написал скрипт, он выполняется, однако сетку и подписи не видно. Ниже привожу текст скрипта.

Буду признателен за помощь. Сергей.

theView=av.GetActiveDoc
viewUnits=theView.GetDisplay.GetUnits
viewProj=theView.GetProjection
theRect=theView.ReturnUserRect

if (theRect=nil) then
exit
end

llx=therect.getleft
lly=therect.getBottom

theWidth=therect.getwidth
theHeight=therect.getheight
rows=Msgbox.Input("Сколько рядов (вверх/вниз):","привет","10")

if ((rows = nil) or (rows.asNumber 1) then

col_prefix=letters.middle((c/26).floor-1,1)

else

col_prefix=""

end

if (c.Mod(26) = 0) then

col_name=letters.Middle(25,1)

else

col_name=letters.Middle(c.Mod(26)-1,1)

end

col_id=col_prefix+col_name

originx=llx+((c-1)*csize)

originy=lly+((r-1)*rsize)

size=csize@rsize

origin=originx@originy

rct=rect.make(origin,size)

if (viewunits=#UNITS_LINEAR_METERS) then

rct=rct.ReturnUnprojected(viewproj)

end

newrec=gridftab.AddRecord

gridftab.SetValue(shpfield,newrec,rct.aspolygon)

gridftab.SetValue(labfield,newrec,col_id+row_id)
end
end
gridftab.SetEditable(false)
av.clearMsg

mytheme=ftheme.Make(gridftab)
mysym=av.GetSymbolWin.GetPalette.GetList(#PALETTE_LIST_FILL).Get(0)
mysym.setolwidth(2)
mytheme.GetLegend.GetSymbols.Set(0,mysym)
mytheme.SetName("Grid")
mytheme.SetActive(true)
myTheme.SetVisible(true)

theview.AddTheme(mytheme)
mytheme.Invalidate(true)
theview.GetDisplay.Flush

yn=MsgBox.YesNo("Надписать сетку?","Gridmaker",true)

if (yn) then
for each thm in theView.GetThemes

if (thm mytheme) then

thm.SetActive(False)

end
end

theView.LabelThemes(false)
end


 Рисуем сетку, а ее не видно [ VAK ]
Понедельник, 16 сентября 2002, 14:44

Привет, земляк.
Я так понял, ты вояешь в MapInfo.
Сам я скриптовал в InGeo, но если тебе нужна помощь в заинтересованном обсуждении алгоритма - заходи к нам.
Наш E-mail: kravchuk@bashkortostan.ru

Ответить

Знаком «*» отмечены обязательные для заполнения поля.
Ваше имя:  *
Адрес электронной почты:  
Тема:  *
Сообщение:
 *
Подтверждение:
(не требуется для зарегистрированных пользователей)
 *
 



Copyright © 1999–2025 ГИС ObjectLand
ГИС ObjectLand ® ООО «Радом-АйТи»
Информация о лицензировании
главная | о продукте | скачать | купить | поддержка | новости