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.
Deploying a Custom Add-In Task
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.
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 SAS Enterprise Guide 4.2 will supports 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 4.1 custom tasks.
Custom tasks for AMO 2.1 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.
SAS Enterprise Guide 4.2 and SAS Add-In for Office 4.2 support .NET 2.0 and later. You can create custom tasks using the most recent development tools from Microsoft and target .NET 2.0, 3.0, and 3.5. You can even use the "free" versions of Microsoft Visual C# Express or Microsoft Visual Basic Express. SAS has a preliminary getting started guide available here (ZIP file with doc and example).
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.
- 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 the 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 installation).
- 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.
- 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.
Changes with Enterprise Guide 4.2
With SAS Enterprise Guide 4.2 and SAS Add-In for Microsoft Office 4.2, there are multiple special folders that the application will scan for custom tasks. For SAS Enterprise Guide, the folders are:
- %appdata%\SAS\EnterpriseGuide\4.2\Custom (for just the current user)
- C:\Program Files\SAS\EnterpriseGuide\4.2\Custom (for all users)
For SAS Add-In for Microsoft Office, the folders are:
- %appdata%\SAS\AddInForMicrosoftOffice\4.2\Custom (for just the current user)
- C:\Program Files\SAS\AddInForMicrosoftOffice\4.2\Custom (for all users)
And finally, if you want to deploy a single copy of a custom task in both applications, you can copy it to this one special folder:
- %appdata%\sas\SharedSettings\4.2\Custom (for just the current user)
The "%appdata%" notation is a Microsoft Windows environment variable that maps to your personal profile area, which is specific to your user account on the machine. This allows you to add custom tasks to your installation without affecting any other users who might share your machine.
Note: if your custom task depends on other assemblies (DLLs) that ship with SAS Enterprise Guide or SAS Add-In for Microsoft Office, you do not need to copy those files to the Custom directory. If your custom task depends on assemblies that are not supplied by SAS (either 3rd party or that you developed), you do need to copy those to the Custom directory along with the task.