HOW TO
Instructions provided are for setting up ArcScene to flash a coordinate location. This functionality requires ArcObjects code.
Note:
For more information on creating a UIControl, see the ArcGIS Desktop Help topic 'How to create custom commands with VBA.'
Note:
If you already have an existing UIButtonControl or you wish to change the name of the UIButtonControl, you will need to make the change to the UIButtonControl code portion below accordingly before the button can be used.
Code:
Dim pPoint As IPoint
Set pPoint = New Point
pPoint.X = InputBox("Please enter X coordinate of the location to flash:", "X Coordinate", -114) ' specify location of the flash
pPoint.Y = InputBox("Please enter Y coordinate of the location to flash:", "Y Coordinate", 34)
Dim pZA As IZAware
Set pZA = pPoint
pZA.ZAware = True
pPoint.Z = 0
Dim Duration, Start
Duration = InputBox("Please enter the number of seconds to flash:", "Number of Seconds", 5) 'number of seconds to flash
Start = Timer
Do While Timer < Start + Duration
FlashLocation3D pPoint
Loop
End Sub
Code:
Public Sub FlashLocation3D(pLoc As IPoint)
Dim pApp as IApplication
Set pApp = Application
If TypeOf pApp Is ISxApplication Then
Dim pSxDoc As ISxDocument
Set pSxDoc = pApp.Document
Dim pDisplay3D As IDisplay3D
Set pDisplay3D = pSxDoc.Scene.SceneGraph
pDisplay3D.FlashLocation pLoc
End If
End Sub
Note:
After clicking the new button, the X and Y location can be changed, as well as the length of time the feature is to flash in the dialog boxes.
Article ID:000008664
Get help from ArcGIS experts
Download the Esri Support App