BookmarkSubscribeRSS Feed
🔒 This topic is solved and locked. Need further help from the community? Please sign in and ask a new question.
Bill_Guinan
Calcite | Level 5

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

 

 

1 ACCEPTED SOLUTION

Accepted Solutions
ChrisHemedinger
Community Manager

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

It's time to register for SAS Innovate! Join your SAS user peers in Las Vegas on April 16-19 2024.

View solution in original post

2 REPLIES 2
ChrisHemedinger
Community Manager

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

It's time to register for SAS Innovate! Join your SAS user peers in Las Vegas on April 16-19 2024.
Bill_Guinan
Calcite | Level 5
Thanks, I knew I was missing something relatively simple.

sas-innovate-2024.png

Don't miss out on SAS Innovate - Register now for the FREE Livestream!

Can't make it to Vegas? No problem! Watch our general sessions LIVE or on-demand starting April 17th. Hear from SAS execs, best-selling author Adam Grant, Hot Ones host Sean Evans, top tech journalist Kara Swisher, AI expert Cassie Kozyrkov, and the mind-blowing dance crew iLuminate! Plus, get access to over 20 breakout sessions.

 

Register now!

SAS Enterprise Guide vs. SAS Studio

What’s the difference between SAS Enterprise Guide and SAS Studio? How are they similar? Just ask SAS’ Danny Modlin.

Find more tutorials on the SAS Users YouTube channel.

Click image to register for webinarClick image to register for webinar

Classroom Training Available!

Select SAS Training centers are offering in-person courses. View upcoming courses for:

View all other training opportunities.

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