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


I am using C# and have played with some of the examples with success.

I would like to read a macro variable, and have attempted the following two statements.   The result is that the addin compiles and runs but does not return the value of the macro variable within the add in.

SasServer server = new SAS.Tasks.Toolkit.SasServer(Consumer.AssignedServer);          

test = server.GetSasMacroValue("MCRNME");

Does anyone have a working example they would like to share of this method?


1 ACCEPTED SOLUTION

Accepted Solutions
ChrisHemedinger
Community Manager

That should work, just as you have it, as long as the macro variable exists.

Try this example and see if the macro variable you're looking for is there:

http://blogs.sas.com/content/sasdummy/2011/11/22/inspecting-sas-macro-variables-in-sas-enterprise-gu...

Chris

Check out SAS Innovate on-demand content! Watch the main stage sessions, keynotes, and over 20 technical breakout sessions!

View solution in original post

3 REPLIES 3
ChrisHemedinger
Community Manager

That should work, just as you have it, as long as the macro variable exists.

Try this example and see if the macro variable you're looking for is there:

http://blogs.sas.com/content/sasdummy/2011/11/22/inspecting-sas-macro-variables-in-sas-enterprise-gu...

Chris

Check out SAS Innovate on-demand content! Watch the main stage sessions, keynotes, and over 20 technical breakout sessions!
DLARLICK
Calcite | Level 5

Just a follow up question.  Of the examples all look to use a TaskForm to actually execute the task.  I have a simple task that I am doing an do not need to expose a windows interface, but do need a custom task (.NET).  I just need it executed in the process flow.

How is the SAS interface to be executed without a TaskForm in use?

ChrisHemedinger
Community Manager

In the Task class Show() method (which you override from the SasTask class), simply return ShowResult.RunNow, without creating/showing the form.

Check out SAS Innovate on-demand content! Watch the main stage sessions, keynotes, and over 20 technical breakout sessions!

sas-innovate-2024.png

Available on demand!

Missed SAS Innovate Las Vegas? Watch all the action for free! View the keynotes, general sessions and 22 breakouts on demand.

 

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
  • 3 replies
  • 1012 views
  • 3 likes
  • 2 in conversation