Desktop productivity for business analysts and programmers

Setup SAS EG Custom Task Forms

Accepted Solution Solved
Reply
New Contributor
Posts: 2
Accepted Solution

Setup SAS EG Custom Task Forms

I am attempting to learn how to write a custom task in Visual Studio 2013 for SAS EG 6.1. I am following along in "Custom Tasks for SAS Enterprise Guide Using Microsoft .Net". 

 

Where I'm stuck is getting the form to show, I've used the Template to create the application and it has created a defaut Overrides Function Show method. In the book, when it comes to "Adding a User Interface" I copied what was there (changed for my form)

' This function is called when it's time to show the task window
    Public Overrides Function Show(ByVal Owner As IWin32Window) As SAS.Shared.AddIns.ShowResult
        Dim dlg As Form1 = New Form1()
        dlg.Text = String.Format("Test my form.")

        If (DialogResult.OK = dlg.ShowDialog(Owner)) Then
            Return ShowResult.RunNow
        End If
        Return ShowResult.RunNow
    End Function

 

However, when I run the debugger and click on my task in SAS EG, it just opens a file dialog, not the Windows From I created. 

 

Any help would be appreciated.

 

BIll

 

 


Accepted Solutions
Solution
‎02-21-2017 08:16 AM
Community Manager
Posts: 2,884

Re: Setup SAS EG Custom Task Forms

I think the initial file dialog you see comes from EG wanting you to add/select a data set for your task.  After selecting the data set, your task form would show.

 

If your task does not require input data, then change the properties of your task by specifying this class attribute on your task class:

 

[InputRequired(InputResourceType.None)]

(Instead of "[InputRequired(InputResourceType.Data)]")

 

Chris

View solution in original post


All Replies
Solution
‎02-21-2017 08:16 AM
Community Manager
Posts: 2,884

Re: Setup SAS EG Custom Task Forms

I think the initial file dialog you see comes from EG wanting you to add/select a data set for your task.  After selecting the data set, your task form would show.

 

If your task does not require input data, then change the properties of your task by specifying this class attribute on your task class:

 

[InputRequired(InputResourceType.None)]

(Instead of "[InputRequired(InputResourceType.Data)]")

 

Chris

New Contributor
Posts: 2

Re: Setup SAS EG Custom Task Forms

Thanks, I knew I was missing something relatively simple.
☑ This topic is solved.

Need further help from the community? Please ask a new question.

Discussion stats
  • 2 replies
  • 142 views
  • 0 likes
  • 2 in conversation