Select to view content in your preferred language

scripting - How to tell if feature is being created or being edited?

1033
4
Jump to solution
05-09-2013 07:21 PM
TereseRowekamp
Deactivated User
I'm using VBscript. Is there a way to tell in my form load code if the edit form is being opened because the user is editing an existing feature vs creating a new feature?
Tags (3)
0 Kudos
1 Solution

Accepted Solutions
JamesNunn
Deactivated User
Great,

By the way, why don't you tick the answer (or add your own answer with more details and tick that) to help others find and solve similar problems.:)

View solution in original post

0 Kudos
4 Replies
JamesNunn
Deactivated User
Yes:

http://resources.arcgis.com/en/help/arcpad/10.0/sdk/scripting/ArcPadScriptingObjectModel~Form~Mode.h...

Dim thisform = Application.Map.Layers(lyrname).Forms('EDITFORM')

If lyrform.Mode = 2 Then
    Application.MessageBox('Form open for editing')
Else If lyrform.Mode = 3 Then
    Application.MessageBox('Form open for new feature')
End If


My vb is rusty, but you should get the picture.
0 Kudos
TereseRowekamp
Deactivated User
Thanks James. I eventually figured it out and got my code working as needed, but it's good to get the answer out here, too.
0 Kudos
JamesNunn
Deactivated User
Great,

By the way, why don't you tick the answer (or add your own answer with more details and tick that) to help others find and solve similar problems.:)
0 Kudos
TereseRowekamp
Deactivated User
You know James, I've looked before trying to find where I check a reply as the answer and I never noticed the grayed out checkmark until right now when I looked again. Sorry I didn't mark your answer before!
0 Kudos