📄 digitizetinline.frm
字号:
VERSION 5.00
Begin VB.Form frmDigitizeTinLine
BorderStyle = 4 'Fixed ToolWindow
Caption = "Options"
ClientHeight = 1224
ClientLeft = 48
ClientTop = 288
ClientWidth = 3588
LinkTopic = "Form1"
MaxButton = 0 'False
MinButton = 0 'False
ScaleHeight = 1224
ScaleWidth = 3588
ShowInTaskbar = 0 'False
StartUpPosition = 3 'Windows Default
Begin VB.CheckBox chkConflictDetect
Caption = "Conflict detection"
Height = 195
Left = 120
TabIndex = 3
Top = 960
Width = 1695
End
Begin VB.CommandButton cmdNo
Height = 315
Left = 480
MouseIcon = "DigitizeTinLine.frx":0000
TabIndex = 9
Top = 1080
Visible = 0 'False
Width = 315
End
Begin VB.CommandButton cmdCross
Height = 315
Left = 120
MouseIcon = "DigitizeTinLine.frx":0152
TabIndex = 8
Top = 1080
Visible = 0 'False
Width = 315
End
Begin VB.ComboBox cboSFType
Height = 315
Left = 1320
TabIndex = 7
Text = "cboSFType"
Top = 120
Width = 2175
End
Begin VB.TextBox txtZ
Height = 285
Left = 2640
TabIndex = 5
Text = "txtZ"
Top = 840
Width = 855
End
Begin VB.ComboBox cboHeightSource
Height = 315
Left = 1320
Style = 2 'Dropdown List
TabIndex = 2
Top = 480
Width = 2175
End
Begin VB.CommandButton Command1
Height = 315
Left = 960
Picture = "DigitizeTinLine.frx":045C
Style = 1 'Graphical
TabIndex = 0
Top = 1080
Visible = 0 'False
Width = 315
End
Begin VB.Label labHeight
Caption = "Height:"
Height = 255
Left = 1920
TabIndex = 10
Top = 900
Width = 615
End
Begin VB.Label Label3
Caption = "SFType:"
Height = 255
Left = 120
TabIndex = 6
Top = 140
Width = 735
End
Begin VB.Label Label2
Caption = "Height:"
Height = 255
Left = 2040
TabIndex = 4
Top = 480
Width = 495
End
Begin VB.Label Label1
Caption = "Height source:"
Height = 255
Left = 120
TabIndex = 1
Top = 500
Width = 1095
End
End
Attribute VB_Name = "frmDigitizeTinLine"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False
' Copyright 1995-2004 ESRI
' All rights reserved under the copyright laws of the United States.
' You may freely redistribute and use this sample code, with or without modification.
' Disclaimer: THE SAMPLE CODE IS PROVIDED "AS IS" AND ANY EXPRESS OR IMPLIED
' WARRANTIES, INCLUDING THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
' FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL ESRI OR
' CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY,
' OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
' SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
' INTERRUPTION) SUSTAINED BY YOU OR A THIRD PARTY, HOWEVER CAUSED AND ON ANY
' THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT ARISING IN ANY
' WAY OUT OF THE USE OF THIS SAMPLE CODE, EVEN IF ADVISED OF THE POSSIBILITY OF
' SUCH DAMAGE.
' For additional information contact: Environmental Systems Research Institute, Inc.
' Attn: Contracts Dept.
' 380 New York Street
' Redlands, California, U.S.A. 92373
' Email: contracts@esri.com
Option Explicit
Public Sub Init(pTin As ITin)
Dim pEnv As IEnvelope
Set pEnv = pTin.Extent
Dim pSurf As ISurface
Set pSurf = pTin
If (pSurf.IsVoidZ(pEnv.zmin)) Then
txtZ = "0.0"
Else
Dim sZ As String
sZ = Format((pEnv.zmax + pEnv.zmin) * 0.5, "###0.00")
txtZ = sZ
End If
End Sub
Private Sub cboHeightSource_Click()
txtZ.Enabled = (cboHeightSource.ItemData(cboHeightSource.ListIndex) = 4)
labHeight.Enabled = txtZ.Enabled
End Sub
Private Sub Form_Load()
cboSFType.AddItem "Hard line"
cboSFType.ItemData(0) = esriTinHardLine
cboSFType.AddItem "Soft line"
cboSFType.ItemData(1) = esriTinSoftLine
cboHeightSource.AddItem "all from surface"
cboHeightSource.ItemData(0) = 1
cboHeightSource.AddItem "from max z on surface"
cboHeightSource.ItemData(1) = 2
cboHeightSource.AddItem "from min z on surface"
cboHeightSource.ItemData(2) = 3
cboHeightSource.AddItem "as specified"
cboHeightSource.ItemData(3) = 4
cboSFType.ListIndex = 0
cboHeightSource.ListIndex = 3
win32Util.FloatWindow Me, True
End Sub
Public Function GetSFType() As esriTinSurfaceType
GetSFType = cboSFType.ItemData(cboSFType.ListIndex)
End Function
Public Function GetHeightSource() As Long
GetHeightSource = cboHeightSource.ItemData(cboHeightSource.ListIndex)
End Function
Public Function DetectConflicts() As Boolean
DetectConflicts = (chkConflictDetect.Value = 1)
End Function
Public Function GetHeight() As Double
GetHeight = CDbl(txtZ)
End Function
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -