Cause a 3D location to flash in ArcScene

Last Published: April 25, 2020


Instructions provided are for setting up ArcScene to flash a coordinate location. This functionality requires ArcObjects code.


Follow these steps:

  1. Start ArcScene.
  2. Create a new UIButtonControl.

    A. Select Tools > Customize to open the Customize dialog box.
    B. Select the Commands tab.
    C. Select [UIControls] from the Categories list box.
    D. Select Untitled from the Save In drop-down list to save the button to this map document. Select Normal to save the button to all ArcMap documents on the machine.
    E. Click New UIControl.
    F. Select UIButtonControl and click Create.
    G. Drag the new UIButtonControl to the toolbar of choice.
    H. Close the Customize dialog box.

    For more information on creating a UIControl, see the ArcGIS Desktop Help topic 'How to create custom commands with VBA.'

    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.

  3. Right-click the UIButtonControl and select View Source.
  4. Copy this code into the UIButtonControl's click event.

    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
    End Sub

  5. Copy this code below the UIButtonControl's click event.

    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

  6. Click the new button to flash the specified location.

    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

  • ArcMap 9 x

Get help from ArcGIS experts

Contact technical support

Download the Esri Support App

Go to download options

Related Information

Discover more on this topic