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 (Remove extraneous quote)
m (Correct product names, make formatting more consistent)
Line 1: Line 1:
Custom Tasks can be added to SAS Enterprise Guide and Access for Microsoft Office.
+
Custom Tasks can be added to SAS® Enterprise Guide and the SAS® Add-in for Microsoft Office.
  
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 and SAS Add-In for Microsoft Office (aka 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).
  
==.Net Releases==
+
==.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.
+
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 [http://support.sas.com/documentation/onlinedoc/guide/customtasks/SAS.Shared.AddIns.zip the documentation] from the link ''Creating Custom Add-In Tasks for SAS Enterprise Guide.''
+
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 [http://support.sas.com/documentation/onlinedoc/guide/customtasks/SAS.Shared.AddIns.zip the documentation] from the link ''Creating Custom Add-In Tasks for SAS Enterprise Guide.''
  
 
==Deploying a Custom Add-In Task for Use==
 
==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.
+
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.  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'''.  
+
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.
+
You register/deploy custom tasks for both Enterprise Guide and AMO using the same technique.
  
 
===Method 1: "Drop-in" Deployment===
 
===Method 1: "Drop-in" Deployment===
  
You no longer need to perform a separate [[{{PAGENAME}}#Method_2:_Using_the_Add-In_Manager|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.   
+
You no longer need to perform a separate [[{{PAGENAME}}#Method_2:_Using_the_Add-In_Manager|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 probably:
+
The special directory is commonly:
 
   
 
   
 
   C:\Program Files\SAS\Shared Files\BIClientTasks\Custom  
 
   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'').
+
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.
+
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 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.
+
'''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===
 
===Method 2: Using the Add-In Manager===
'''NOTE''': This method only works for Custom Tasks written using .Net 1.1.
+
'''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.  
 
# 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:
 
# If SAS Enterprise Guide is installed:
 
## Start SAS Enterprise Guide.
 
## Start SAS Enterprise Guide.
## Select Add-In->Add-in Manager...
+
## Select '''Add-In->Add-in Manager...'''
# If SAS Add-in for Microsoft Office is installed (and SAS Enterprise Guide is not):
+
# 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 configuration).
+
## 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.
 
# 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.
+
# 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.
+
# Click '''OK''' to accept the add-ins.
  
 
== Expected Changes with Enterprise Guide 4.2==
 
== Expected Changes with Enterprise Guide 4.2==

Revision as of 22:05, 23 February 2009

Custom Tasks can be added to SAS® Enterprise Guide and the SAS® Add-in 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 (EG) and the SAS Add-In for Microsoft Office (AMO).

.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.