; %Events.OnAdd @OpenLog $Tab=@Calc char(9) $Tab=@DequoteText $Tab $Space=@Calc char(32) $Space=@DequoteText $Space @Map.DeselectAll @Map.SelectLayer ID70026 $TO=@Map.SelectedObject $Header=@Map.Object[$TO].TableText @Map.DeselectAll @Text[1].Clear @Text[1].Add $Header $EO=@EventObject $ParcelArea=@Map.Object[$EO].Parameter[ID7000516] $S=@Concat $Space,$Tab,$Space,$Tab,$Space,$Tab,$Space,$Tab,Усього земель $S=$S$Tab$ParcelArea @Text[1].Add $S $I=0 $J=0 $C=@Map.Count %Loop $I=$I+1 $LID=@Map.Object[$I].LayerID @if $LID<>70009 then @Goto %Continue $J=$J+1 $CN=@Map.Object[$I].Parameter[ID7000901] $LandCode=@StringPart 1 $CN $LandName=@Map.Object[$I].CalculateFormula SEF($LandCode,LandCodeOld.txt) $LandCode2=@Map.Object[$I].CalculateFormula SEF($LandCode,CN2LandCode.txt) $LandName2=@Map.Object[$I].CalculateFormula SEF($LandCode2,LandCode.txt) $LandArea=@Map.Object[$I].Parameter[ID7000903] $S=@Concat $J,$Tab,$LandCode,$Tab,$LandName,$Tab,$LandCode2,$Tab,$LandName2,$Tab $S=$S$LandArea @Text[1].Add $S %Continue @if $I<$C then @Goto %Loop $S=@Text[1].Text @Map.Object[$TO].TableText $S @Window.Refresh ; @Map.SelectLayer ID70006 $Orenda=@Map.SelCount $Orendatxt=" Власність" @if $Orenda>0 then $Orendatxt=" Оренда" $Orendatxt=@DequoteText $Orendatxt @Map.DeselectAll ;@Map.SelectLayer ID2000000034 ;$Tabl=@Map.SelectedObject ;$Txt1=Категорія земель ;$Txt2=Цільове призначення ;$Txt3=Умови надання ;@Text.Clear ;@Map.DeselectAll ;@Map.SelectLayer id70005 ;$ThisObj=@Map.SelectedObject ;$KZ=@Map.Object[$ThisObj].Parameter[id7000509] ;$KZCode=@StringPart 1 $KZ ;$KZName=@Calc Replace("$KZ","$KZCode","",0,0) ;$KZName=@DequoteText $KZName ;$CP=@Map.Object[$ThisObj].Parameter[id7000510] ;$CPCode=@StringPart 1 $CP ;$CPName=@Calc Replace("$CP","$CPCode","",0,0) ;$CPName=@DequoteText $CPName ;$S=$Txt1$Tab$KZCode$Tab$KZName ;@Text.Add $S ;$S=$Txt2$Tab$CPCode$Tab$CPName ;@Text.Add $S ;$S=$Txt3$Tab$Space$Tab$Orendatxt ;@Text.Add $S ;$S=@Text.Text ;@Map.Object[$Tabl].TableText $S ; @Map.DeselectAll @Map.SelectLayer ID121212124 $Tabl=@Map.SelectedObject @Text.Clear @Map.DeselectAll @Map.SelectLayer id70005 $MON=@Map.SelectedObject ;дістаєм значенння параметра, який містить інформацію про власників $PP=@Map.Object[$MON].Parameter[ID7000520] ;визначаємо кількість співвласників $PC=@XML.NodeCount /Proprietors ProprietorInfo $PP ;пропускаємо незаповнені @if $PC<1 then @Goto %IgnoreObject ;для кожного співвласника $I=0 $Res= %Loop2 $I=$I+1 ;визначаємо тип (юр. чи физ. особа) $IsLE=@XML.NodeCount ProprietorInfo[$I]/Authentication LegalEntity $PP @if $IsLE=1 then @Goto %LegalEntity ;для юридичних осіб дістаємо ;прізвище $LN=@XML.XPath ProprietorInfo[$I]/Authentication/NaturalPerson/FullName/LastName $PP ;им'я $FN=@XML.XPath ProprietorInfo[$I]/Authentication/NaturalPerson/FullName/FirstName $PP ;по батькові $MN=@XML.XPath ProprietorInfo[$I]/Authentication/NaturalPerson/FullName/MiddleName $PP ;ігноруємо фізичних осіб без прізвища @if $LN= then @Goto %Continue2 ;добавляємо роздільник списку для пе перших по порядку співвласників @if $Res<> then $Res=$Res, ;добавляем ПІБ в Список $Res=$Res$LN $FN $MN @Goto %Continue2 ;для юридичних осіб %LegalEntity ;дістаємо назву $N=@XML.XPath ProprietorInfo[$I]/Authentication/LegalEntity/Name $PP ;ігноруємо незаповнені @if $N= then @Goto %Continue2 ;добавляємо роздільник списку для пе перших по порядку співвласників @if $Res<> then $Res=$Res, ;добавляем назву в Список $Res=$Res$N %Continue2 @if $I<$PC then @Goto %Loop2 @if $Res= then @Goto %IgnoreObject ;вносимо список в параметр ID7000580 @Text.Add $Res $S=@Text.Text @Map.Object[$Tabl].TableText $S @Window.Refresh ; $ResrtCount=@Map.Layers.ObjectCount ID70008 @if $ResrtCount=0 then @Map.Layers.SetState ID70027 3 @if $ResrtCount=0 then @Goto %Exit $RestrNumber=@Map.Parameters.Add 7000855 3 Номер обмеження @Map.Parameters.SetAttributes ID7000855 0 5 0 10 1 16777215 0 Arial 60 0 -16777208 $ValParList=@Map.Layers.GetValidParameters ID70008 $ValParList=$ValParList,$RestrNumber @Map.Layers.SetValidParameters ID70008 $ValParList @Map.DeselectAll @Map.SelectLayer ID70027 $TOR=@Map.SelectedObject $HeaderR=@Map.Object[$TOR].TableText $L=@Calc Length("$HeaderR") $HeaderR=@Calc Copy("$HeaderR",1,$L-2) $HeaderR=@DequoteText $HeaderR @Map.DeselectAll @Text[2].Clear @Text[2].Add $HeaderR $I=0 $J=0 %LoopR $I=$I+1 $LID=@Map.Object[$I].LayerID @if $LID<>70008 then @Goto %ContinueR $J=$J+1 @Map.Object[$I].Parameter[$RestrNumber] $J @Map.Object[$I].CreateCaption $RestrNumber 0 0 1 1 0 0 $RestrArea=@Map.Object[$I].CalculateFormula P[0] $RestrCodeNName=@Map.Object[$I].Parameter[ID7000800] $RestrCode=@StringPart 1 $RestrCodeNName $RestrName1=@Map.Object[$I].CalculateFormula SEF($RestrCode,RestrCodes.txt) $RestrName2=@Map.Object[$I].Parameter[ID7000801] $RestrName=$RestrName1, $RestrName2 $LWCodeNName=@Map.Object[$I].Parameter[ID7000800] $LWCode=@StringPart 1 $LWCodeNName $LWName=@Map.Object[$I].CalculateFormula SEF($LWCode,Zakony.txt) $S=$J$Tab$RestrCode$Tab$RestrName$Tab$LWName $S=$S$Tab$RestrArea @Text[2].Add $S %ContinueR @if $I<$C then @Goto %LoopR $S=@Text[2].Text @Map.Object[$TOR].TableText $S %Exit @Window.Refresh ; @CloseLog D:\lOG.txt