Select to view content in your preferred language

offset capture toggle

453
1
07-09-2010 01:34 PM
ChrisSeabrooke
Deactivated User
Is it possible to identify the state of the 'offset capture toggle' -- I have a VB script that calls the internal command 'offsetpoly'. I want to check if the toggle is 'on' before calling the command so I don't toggle it 'off'. I'd also like to be able to check the offset distance and direction that ArcPad is storing. Does anyone know how to access this information?

Chris
Tags (3)
0 Kudos
1 Reply
StephenQuan
Deactivated User
Whilst there isn't a way for customizers to programmatically to determine if offsetpoly is currently active, you can use the following workaround to measure the number of seconds the offsetpoly command takes, i.e.

Dim start, elapsed
start = now
ExecuteCommand("offsetpoly")
elapsed = (now - start) * 86400.0

If the command toggled the tool to the "off" state, then elapsed will be low, usually, 0.0. If the command toggled the tool to the "on" state, a dialog box appears and it usually takes the user at least 3 seconds to respond to it. So, you can used this fact to make an educated guess at what happened and react accordingly. For example,

Dim start, elapsed
start = now
ExecuteCommand("offsetpoly")
elapsed = (now - start) * 86400.0
If elapsed <= 1.0 Then
  ExecuteCommand("offsetpoly")
End If
0 Kudos