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"
(original creation - still a draft)
Revision as of 12:14, 20 February 2009
Custom Tasks can be added to SAS Enterprise Guide and Access for Microsoft Office.
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 and SAS Add-In for Microsoft Office (aka AMO).
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 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 ship 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 preferences. Usually it is convenient to package several related add-in tasks together into a single assembly, as 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. 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 Manage SAS Favorites.
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 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 special directory is probably:
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, this you likely have 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 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.
- 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.
- If SAS Enterprise Guide is installed:
- Start SAS Enterprise Guide.
- Select Add-In->Add-in Manager...
- If SAS Add-in for Microsoft Office is installed (and SAS Enterprise Guide is not):
- Run "C:\Program Files\SAS\Shared Files\BIClientTasks\4\RegAddin.exe" (the actual location of this program might vary depending on your configuration).
- Regardless of whether you use option 1 or 2, the Add-in Manager dialog allows you to register new add-in tasks by simply browsing to the .NET assembly.
- 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.
- Click OK to accept the add-ins.