Articles → UIPATH → Create Your First Library In Uipath

Create Your First Library In Uipath






Purpose Of Library





Scenario





Create The Library




  1. Go to "New Project" and select "Library"
  2. Picture showing the Library template while creating a new project in UiPath studio
    Click to Enlarge

  3. A popup window will come to enter the project name and path. Click on the "Create" button
  4. Picture showing the window to enter the project name, path and description
    Click to Enlarge

  5. Once the project is created, go to the file "NewActivity.xaml"
  6. Inside the "NewActivity.xaml", create 2 arguments. The argument "inputFolderPath" inputs the folder path and the argument "outputFilesCount" is the output argument that returns the count of files
  7. Picture showing the 2 arguments used in the library based project in uipath
    Click to Enlarge

  8. Drag and drop the "Assign" activity and set the value to "outputFilesCount" arguments
  9. Picture showing the assign activity to assign the value to inputFolderPath variable
    Click to Enlarge

  10. Save the library project

Publish The Library




  1. Click on the "Publish" button in the "Design" tab
  2. Picture showing the Publish button for publishing the bot
    Click to Enlarge

  3. A window will appear to set the project properties. Click on the "Next" button
  4. Picture showing the first window of the publishing wizard in Uipath
    Click to Enlarge

  5. In the next window, select the "Publish options". Here, set the "Publish To" to "Custom" and set the "Custom URL" to the local path
  6. Picture showing the second window of the publishing wizard in Uipath
    Click to Enlarge

  7. Click on the "Publish" button
  8. Once the "publish" is completed, you will get the following message
  9. Picture showing the window that confirms that package is published
    Click to Enlarge

  10. The package is created with the file extension ".nupkg"
  11. Picture showing the library file published on the local drive
    Click to Enlarge



Add Library In Uipath Studio




  1. Go to "Home" → "Settings" → "Manage Sources"
  2. Picture showing the Manage Sources for adding the library path
    Click to Enlarge

  3. Click on the "+" button to add the package path
  4. Enter the "Name" and "Source" and click on the "Add" button
  5. Picture showing the screen for adding the library path
    Click to Enlarge



Use The Library In The New Project




  1. Create a new project of type "Process"
  2. Once the project is created, click on the "Manage Packages" in the "Design" tab
  3. A popup window will appear. Go to "MyPackage" and click on the required library
  4. Picture showing the process of adding the library in the process in Uipath
    Click to Enlarge

  5. Click on "Install" and then "Save"
  6. Once installed, the library will appear on the activities window
  7. Picture showing the library added in the activity window of the Uipath
    Click to Enlarge

  8. Drag and drop the "NewActivity" activity and set the arguments
  9. Finally, display the count in the message box
  10. Save and run the bot
  11. Picture showing the New Activity of the library on the designer
    Click to Enlarge



Output


Picture showing the output of the process in UiPath
Click to Enlarge


Posted By  -  Karan Gupta
 
Posted On  -  Friday, March 26, 2021

Query/Feedback


Your Email Id
 
Subject
 
Query/FeedbackCharacters remaining 250