Message 1 of 5
add-in and button execution problem

Not applicable
07-22-2008
09:26 AM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report
I have an add-in utilizing the following code. The
problem I am having is that after exeuting the button and loading the form a new
instance of the same form opens everytime I hit the spacebar. Does anyone know
how to ensure only 1 instance of the form can be loaded at a time. Thanks in
advance for any help.
problem I am having is that after exeuting the button and loading the form a new
instance of the same form opens everytime I hit the spacebar. Does anyone know
how to ensure only 1 instance of the form can be loaded at a time. Thanks in
advance for any help.
Private
color=#0000ff size=2>Sub oButtonProps_OnExecute(
color=#0000ff size=2>ByVal Context
color=#0000ff size=2>As Inventor.NameValueMap)
color=#0000ff size=2>Handles oButtonProps.OnExecute
On
color=#0000ff size=2>Error
size=2>GoTo err_oButtonProps
Dim oDoc
color=#0000ff size=2>As Document
On
color=#0000ff size=2>Error
size=2>Resume
size=2>Next
oDoc = Inv.ActiveDocument
If Err.Number
Then
Exit
color=#0000ff size=2>Sub
End
color=#0000ff size=2>If
' Check if File is read only and see if
user wants to check out
Dim RO
color=#0000ff size=2>As
size=2>String
RO = ROnly(oDoc.FullDocumentName)
If RO = 0
color=#0000ff size=2>Or RO = 2
size=2>Or RO = 32
size=2>Or RO = 34
size=2>Then
Else
Check_Out()
End
color=#0000ff size=2>If
mIV_Properties =
NewIV_Properties
mIV_Properties.Visible =
size=2>True
mIV_Properties.Show()
mIV_Properties =
Nothingsize=2>
err_oButtonProps:
End
color=#0000ff size=2>Sub
Scott A.
McCoy