扫一扫
分享文章到微信
扫一扫
关注官方公众号
至顶头条
Private Sub Command1_Click() Dim FindObj As MapXLib.Find Dim FoundFeature As FindFeature '从要查询的RTU图层生成Find对象,并为这个对象设置要查询的FindDataSet、FindField属性 Set FindObj = Form1.Map1.Layers.Item(1).Find Set FindObj.FindDataset = Form1.Map1.DataSets("RTU节点" & " dataset") Set FindObj.FindField = FindObj.FindDataset.Fields("RTUName") Set FoundFeature = FindObj.Search(Combo1.Text) Me.Hide ' 关掉AutoRedraw是因为CenterX(Y)的改变就要刷新图层,AutoRedraw打开的话会造成二次刷新 Form1.Map1.AutoRedraw = False Form1.Map1.CenterX = FoundFeature.CenterX Form1.Map1.CenterY = FoundFeature.CenterY Form1.Show End Sub |
Private Sub Command2_Click() Dim FindObj As MapXLib.Find Dim FoundFeature As FindFeature '从要查询的RTU图层生成Find对象,并为这个对象设置要查询的FindDataSet、FindField属性 Set FindObj = Form1.Map1.Layers.Item(1).Find Set FindObj.FindDataset = Form1.Map1.DataSets("RTU节点" & " dataset") Set FindObj.FindField = FindObj.FindDataset.Fields("RTUName") Set FoundFeature = FindObj.Search(Text1.Text) If FoundFeature.FindRC Mod 10 = 1 Or FoundFeature.FindRC Mod 10 = 2 Then Me.Hide ' 关掉AutoRedraw是因为CenterX(Y)的改变就要刷新图层,AutoRedraw打开的话会造成二次刷新 Form1.Map1.AutoRedraw = False Form1.Map1.CenterX = FoundFeature.CenterX Form1.Map1.CenterY = FoundFeature.CenterY Form1.Show Else MsgBox "不存在该RTU节点!" End If End Sub |
如果您非常迫切的想了解IT领域最新产品与技术信息,那么订阅至顶网技术邮件将是您的最佳途径之一。
现场直击|2021世界人工智能大会
直击5G创新地带,就在2021MWC上海
5G已至 转型当时——服务提供商如何把握转型的绝佳时机
寻找自己的Flag
华为开发者大会2020(Cloud)- 科技行者