As the first step in the decommissioning of sasCommunity.org the site has been converted to read-only mode.


Here are some tips for How to share your SAS knowledge with your professional network.


Difference between revisions of "Deploying a Custom Add-In Task"

From sasCommunity
Jump to: navigation, search
m (Correct product names, make formatting more consistent)
(clarified releases)
Line 1: Line 1:
Custom Tasks can be added to SAS® Enterprise Guide and the SAS® Add-in for Microsoft Office.
+
Custom Tasks can be added to SAS® Enterprise Guide 4.1 and the SAS® Add-in for Microsoft Office 2.1.
  
 
See [http://support.sas.com/documentation/onlinedoc/guide/customtasks/index.htm Creating Custom Add-In Tasks for SAS Enterprise Guide] on the SAS support site for details and examples for creating your custom tasks that can be run in both SAS Enterprise Guide (EG) and the SAS Add-In for Microsoft Office (AMO).
 
See [http://support.sas.com/documentation/onlinedoc/guide/customtasks/index.htm Creating Custom Add-In Tasks for SAS Enterprise Guide] on the SAS support site for details and examples for creating your custom tasks that can be run in both SAS Enterprise Guide (EG) and the SAS Add-In for Microsoft Office (AMO).
 +
 +
'''NOTE''':  These instructions are specific to the releases listed above. More options will be available with the next release ('''4.2'''). Note also that tasks created for 4.1/2.1 can still work in 4.2 - so there should be no compatibility issues.
  
 
==.NET Releases==
 
==.NET Releases==

Revision as of 11:11, 24 February 2009

Custom Tasks can be added to SAS® Enterprise Guide 4.1 and the SAS® Add-in for Microsoft Office 2.1.

See Creating Custom Add-In Tasks for SAS Enterprise Guide on the SAS support site for details and examples for creating your custom tasks that can be run in both SAS Enterprise Guide (EG) and the SAS Add-In for Microsoft Office (AMO).

NOTE: These instructions are specific to the releases listed above. More options will be available with the next release (4.2). Note also that tasks created for 4.1/2.1 can still work in 4.2 - so there should be no compatibility issues.

.NET Releases

The current release of Enterprise Guide (4.1) requires that custom tasks be written in .NET 1.1 (or earlier). The most recent .NET release is 3.5 and once it ships, SAS Enterprise Guide 4.2 will support that release. See SAS EG and .NET_2.0 for a way to write a wrapper that may enable using later releases of .NET for Enterprise Guide custom tasks.

Custom tasks for AMO can be written in later versions of .NET and will be recognized as long as they meet the interface requirements. That documentation is available by downloading the documentation from the link Creating Custom Add-In Tasks for SAS Enterprise Guide.

Deploying a Custom Add-In Task for Use

A custom add-in task ships within a .NET assembly (or DLL file). You may have multiple tasks within a single .NET assembly or simply organize them as one add-in task per file, depending on your preference. Usually it is convenient to package several related add-in tasks together into a single assembly, because it makes it easier to share code and implementations among the tasks.

Once the .NET assembly has been built, deploying and registering to target client machines is simple, using one of two methods, described below. Once added, the add-in tasks will be available in from the Add-In menu in SAS Enterprise Guide, as well as in the task list. In the SAS Add-in for Microsoft Office, you will find the new entries when you select Analyze Data.

You register/deploy custom tasks for both Enterprise Guide and AMO using the same technique.

Method 1: "Drop-in" Deployment

You no longer need to perform a separate registration step in order for SAS Enterprise Guide 4.1 or the SAS Add-In for Microsoft Office 2.1 to recognize your custom task. Instead, you can simply copy the assembly (dll) to a special directory and the application will recognize it automatically the next time that you start the application.

The special directory is commonly:

 C:\Program Files\SAS\Shared Files\BIClientTasks\Custom 

Note that the first part of the path (C:\Program Files\SAS\Shared Files) may vary depending on your installation (e.g. it may be SAS Institute instead of SAS).

The Custom directory may not exist. However, if the the BIClientTasks directory exists, you have likely found the correct directory and you will need to create the Custom directory.

NOTE: If your custom task depends on other assemblies that ship with SAS Enterprise Guide 4.1 or the SAS Add-In for Microsoft Office 2.1, those files do not need to be copied to the Custom directory. If your custom task depends on other assemblies (either 3rd party or that you developed), you do need to copy those to the Custom directory along with the dll for the task.

Method 2: Using the Add-In Manager

NOTE: This method only works for custom tasks written using .NET 1.1.

  1. Copy the .NET assembly (and any dependent assemblies that your implementation might reference, excluding those provided with SAS Enterprise Guide or the SAS Add-in for Microsoft Office) to a location on the target machine. If you plan to deploy more than one assembly with add-in tasks, you might want to designate a single directory to group them together.
  2. If SAS Enterprise Guide is installed:
    1. Start SAS Enterprise Guide.
    2. Select Add-In->Add-in Manager...
  3. If the SAS Add-in for Microsoft Office is installed (and SAS Enterprise Guide is not):
    1. Run "C:\Program Files\SAS\Shared Files\BIClientTasks\4\RegAddin.exe" (the actual location of this program might vary depending on your installation).
  4. Regardless of whether you used step 2 or 3 above, the Add-in Manager dialog allows you to register new add-in tasks by simply browsing to the .NET assembly.
  5. Use the Browse button to navigate to the folder where your add-in assembly is located and then click Open. The Add-in Manager shows the available tasks within the assembly that you selected.
  6. Click OK to accept the add-ins.

Expected Changes with Enterprise Guide 4.2

When Enterprise Guide Release 4.2 is available, there will be a different set of instructions for deploying tasks. It will provide more options, more directories that EG and AMO look in for custom tasks. Watch this page to be notified when those details are available.