12.8. Sherlock Parts Service- SherlockPartsService.proto

Click here to return to the main index to Sherlock's APIs.

In this section you will find APIs that allow you to import and export parts lists, see the user-configured part libraries, to see a list of parts with properties different than those in the Sherlock Part Library, and to update the Parts List for a given project. Clicking on the active links in the table below will take you to the selected API.

Table 12.171: Index to Sherlock Parts Service APIs

Method NameRequest TypeResponse TypeDescription
For display purposes, strings in the first three columns are broken into multiple lines and should be read as continuous. For example, the first string in column two should be interpreted as: .ListPartsLibrariesRequest
exportNetList.ExportNetListRequest.ReturnCodeUpdate the values of given parts.
exportPartsList.ExportParts ListRequest.ReturnCodeExport parts list for all parts given a project's CCA.
getBoardSides.GetBoard SidesRequest.GetBoard SidesResponseGet a list of valid board side values.
importPartsList.ImportParts ListRequest.ReturnCodeImport a parts list for a given a project's CCA.
getPart Location.GetPart LocationRequest.GetPart LocationResponseGet the location properties for a part.
getPart LocationUnitsGetPartLocation UnitsRequest.GetPartLocation UnitsResponseGet a list of valid part location units.
listParts Libraries.ListParts LibrariesRequest.ListParts LibrariesResponseList the available parts libraries.
listParts NotUpdated.ListPartsNot UpdatedRequest.ListPartsNot UpdatedResponseList the parts that have not been updated from the Sherlock Part Library.
updatePartsList.Update PartsListRequest.UpdateParts ListResponseUpdate the parts list for a project's CCA.
updatePartsList FromAVL.UpdatePartsList FromAVLRequest.UpdatePartsList FromAVLResponseUpdate the parts list from the AVL
updatePartsList Properties.UpdatePartsList PropertiesRequest.UpdatePartsList PropertiesResponseUpdate the values of given parts.
updateParts Locations.UpdateParts LocationsRequest.UpdateParts LocationsResponseUpate one or more parts' locations using a .csv file.
updateParts LocationsByFile.UpdatePartsLocations ByFileRequest.UpdatePartsLocations ByFileResponseUpdate one or more parts' locations using a CSV file.
update LeadModeling.UpdateLead ModelingRequest.ReturnCodeEnable lead modeling for all non LEADLESS parts leads in a project's CCA.

12.8.1. Export Net List

12.8.1.1. ExportNetListRequest

Contains the options needed to export a net list to a delimited output file (csv but can have delimiters other than a comma).

Table 12.172: ExportNetListRequest

FieldTypeLabelDescription
projectstring Sherlock project name.
ccaNamestring The CCA name.
outputFilePathstring Full path of the file where the table will be written
overwriteExistingbool Flag to determine if existing files should be overwritten if they match the outputFilePath. False by default.
colDelimiterTableDelimiter Enum that specifies supported delimiter character to be used. Set to COMMA by default. Not applicable to Excel files like xls, xlsx.
utf8Enabledbool Flag that specifies if UTF-8 will be used. False by default. Not applicable to Excel files like xls, xlsx.

12.8.1.2. Example: exportNetList

Proto Request Example
{
  "project": "Tutorial Project",
  "ccaName": "Main Board",
  "outputFilePath": "C:\\netlist.csv",
  "overwriteExisting": true,
  "colDelimiter": 0,
  "utf8Enabled": true
}
Python Example:

For a Python example, refer to the online PySherlock Reference.

12.8.2. Export/Import Parts List

12.8.2.1. ExportPartsListRequest

Request to export the parts list for all parts for a project CCA.

Table 12.173: ExportPartsListRequest

FieldTypeLabelDescription
projectstring Sherlock project name.
ccaNamestring The CCA name.
exportFilestring Full file path to the export parts list .csv file.

12.8.2.2. Examples: Export Parts List

Proto Request Example
{
  "project": "Tutorial Project",
  "ccaName": "Main Board",
  "exportFile": "C:\\temp\\test.csv"
}
Python Example

For a Python example, refer to the online PySherlock Reference.

12.8.3. Get Boards Sides

12.8.3.1. GetBoardSidesRequest

Request to list valid board sides.

12.8.3.2. GetBoardSidesResponse

Represents a list of valid board sides.

Table 12.174: GetBoardSidesResponse

FieldTypeLabelDescription
ReturnCodeReturnCode Status code of response.
boardSidesstringrepeatedBoard sides

12.8.3.3. Examples: Get Board Sides

Proto Request Example
{
}
Python Example

For a Python example, refer to the online PySherlock Reference.

12.8.4. Import Parts List

12.8.4.1. ImportPartsListRequest

Request to import a parts list for a project CCA.

Table 12.175: ImportPartsListRequest

FieldTypeLabelDescription
projectstring Sherlock project name.
ccaNamestring The CCA name.
importFilestring Full file path to the parts list .csv file.
importAsUserSrcbool If true, set the data source of the properties to "User". Otherwise, set the data source tot he name of the importFile.

12.8.4.2. Examples: SherlockPartsService.importPartsList()

Proto Request Example
{
  "project": "Tutorial Project",
  "ccaName": "Main Board",
  "importFile": "C:\\Temp\\test.csv",
  "importAsUserSrc": true
}
Python Example

For a Python example, refer to the online PySherlock Reference.

12.8.5. Get Part Location

12.8.5.1. GetPartLocationRequest

Request to get a part's location.

Table 12.176: GetPartLocationRequest

FieldTypeLabelDescription
projectstring Sherlock project name.
ccaNamestring The CCA name.
refDesstring A comma separated list of reference designators for a list of parts, or a Ref Des for one part.
locationUnitsstring Unit of length for the part location. Supported values are IN, MM, M, MIL, MICRON, and NM.

12.8.5.2. GetPartLocationResponse

Represents one or multiple parts' location properties

FieldTypeLabelDescription
returnCodeReturnCode Status code of response.
locationDataGetPartLocationResponse.LocationDatarepeated 

12.8.5.3. GetPartLocationResponse.LocationData

Table 12.177: GetPartLocationResponse.LocationData

FieldTypeLabelDescription
xdouble Location of the part along the X axis.
ydouble Location of the part along the Y axis.
rotationdouble Rotation of the part on the board in degrees.
locationUnitsstring Unit of length for the part location.
boardSidestring Side of board on which the component exists.
mirroredbool Indicates if the component is mirrored across the Y-axis.
refDesstring Ref Des for the corresponding part.

12.8.5.4. Examples: Get Part Location

Proto Request Example
{
  "project": "Tutorial Project",
  "ccaName": "Main Board",
  "refDes": "C1",
  "locationUnits": "in"
}
Python Example

For a Python example, refer to the online PySherlock Reference.

12.8.6. Get Part Location Units

12.8.6.1. GetPartLocationUnitsRequest

Request to list valid location units.

12.8.6.2. GetPartLocationUnitsResponse

Represents a list of valid location units.

Table 12.178: GetPartLocationUnitsResponse

FieldTypeLabelDescription
ReturnCodeReturnCode Status code of response.
unitsstringrepeatedLocation units.

12.8.6.3. Examples: Get Part Location Units

Proto Request Example
{
}
Python Example

For a Python example, refer to the online PySherlock Reference.

12.8.7. List Parts Libraries

12.8.7.1. ListPartsLibrariesRequest

Request to list the available parts libraries.

12.8.7.2. ListPartsLibrariesResponse

Represents a list of available parts libraries.

Table 12.179: ListPartsLibrariesResponse

FieldTypeLabelDescription
ReturnCodeReturnCode Status code of response.
partLibrarystringrepeatedParts library name.

12.8.7.3. Examples: List Parts Libraries

Proto Request Example
{ }
Python Example

For a Python example, refer to the online PySherlock Reference.

12.8.8. List Parts Not Updated

12.8.8.1. ListPartsNotUpdatedRequest

Request to get a list of parts not updated from the Sherlock Part Library.

Table 12.180: ListPartsNotUpdatedRequest

FieldTypeLabelDescription
projectDirstring The full path to the Sherlock project directory.

12.8.8.2. ListPartsNotUpdatedResponse

Represents a list of parts not updated from the Sherlock Part Library.

Table 12.181: ListPartsNotUpdatedResponse

FieldTypeLabelDescription
For display purposes, the long string in column two is broken into multiple lines. It should be interpreted as: ListPartsNotUpdatedResponse.CCA
ReturnCodeReturnCode Status code of response.
ccasListPartsNotUpdated Response.CCArepeated

12.8.8.3. ListPartsNotUpdatedResponse.CCA

Table 12.182: ListPartsNotUpdatedResponse.CCA

FieldTypeLabelDescription
For display purposes, the long string in column two is broken into multiple lines. It should be interpreted as: ListPartsNotUpdatedResponse.CCA.Part
ccaNamestring Name of the CCA.
partsListPartsNotUpdated Response.CCA.Partrepeated

12.8.8.4. ListPartsNotUpdatedResponse.CCA.Part

Table 12.183: ListPartsNotUpdatedResponse.CCA.Part

FieldTypeLabelDescription
refDesstring Reference designator for the part.
partNumberstring Part number.

12.8.8.5. Examples: List Parts Not Updated

Proto Request Example
{
  "project": "Tutorial Project"
}
Python Example

For a Python example, refer to the online PySherlock Reference.

12.8.9. Update Lead Modeling

Request to enable Lead Modeling for all non LEADLESS parts leads.

12.8.9.1. UpdateLeadModelingRequest

Table 12.184: UpdateLeadModelingRequest

FieldTypeLabelDescription
projectstring Sherlock project name.
ccaNamestring The CCA name.

12.8.9.2. Examples: Update Lead Modeling

Proto Request Example
{
  "project": "Tutorial Project",
  "ccaName": "Main Board"
}
Python Example

For a Python example, refer to the online PySherlock Reference.

12.8.10. Update Parts List

12.8.10.1. UpdatePartsListRequest

Request to update a parts list based on matching and duplication preferences provided.

Table 12.185: UpdatePartsListRequest

FieldTypeLabelDescription
projectstring Sherlock project name.
ccaNamestring The CCA name.
partLibrarystring Parts library name.
matchingMatchingMode Designates the matching mode for updates.
duplicationDuplicationMode Designates how to handle duplications during update.

12.8.10.2. UpdatePartsListRequest.DuplicationMode

Table 12.186: UpdatePartsListRequest.DuplicationMode

NameNumberDescription
First0Uses first matched when there is duplication.
Error1Generates an error when there is duplication.
Ignore2Ignore the matches when there is duplication.

12.8.10.3. UpdatePartsListRequest.MatchingMode

Table 12.187: UpdatePartsListRequest.MatchingMode

NameNumberDescription
Both0Matches both part number and manufacturer.
Part1Matches part number only.

12.8.10.4. UpdatePartsListResponse

Contains the status of the update as well as all the update error messages.

Table 12.188: UpdatePartsListResponse

FieldTypeLabelDescription
ReturnCodeReturnCode Status code of response.
updateErrorstringrepeatedParts update error messages.

12.8.10.5. Examples: Update Parts List

Proto Request Example
{
  "project": "Tutorial Project",
  "ccaName": "Main Board",
  "partLibrary": "Local Part Library",
  "matching": 0,
  "duplication": 1
}
Python Example

For a Python example, refer to the online PySherlock Reference.

12.8.11. Update Parts List From AVL

12.8.11.1. UpdatePartsListFromAVLRequest

Request to update the parts list from AVL.

Table 12.189: UpdatePartsListFromAVLRequest

FieldTypeLabelDescription
projectstring Sherlock project name.
ccaNamestring The CCA name.
matchingMatchingMode How Sherlock matches parts in the AVL
duplicationDuplicationMode How Sherlock handles duplicate parts found
avlPartNumAVLPartNum Update part number and vendor/manufacturer or part number only
avlDescAVLDescription Update description or not

12.8.11.2. UpdatePartsListFromAVLResponse

Table 12.190: UpdatePartsListFromAVLResponse

FieldTypeLabelDescription
returnCodeReturnCode Status code of response
numPartsUpdatedint32 Number of parts updated in the parts list
updateErrorsstringrepeatedSpecific errors that occured during update

12.8.11.3. Example: Update Parts List From AVL

Proto Request Example
{
  "project": "Tutorial",
  "ccaName": "Main Board",
  "matching": 1,
  "duplication": 2,
  "avlPartNum": 2,
  "avlDesc": 1
}
Python Example:

For a Python example, refer to the online PySherlock Reference.

12.8.12. Update Parts List Properties

12.8.12.1. UpdatePartsListPropertiesRequest

Request to update one or more properties of one or more parts in a parts list.

Table 12.191: UpdatePartsListPropertiesRequest

FieldTypeLabelDescription
projectstring Sherlock project name.
ccaNamestring The CCA name for which part properties will be updated.
partPropertiesUpdatePartsListProperties Request.PartPropertiesrepeatedList of parts with properties to be updated.

12.8.12.2. UpdatePartsListPropertiesRequest.PartProperties

Table 12.192: UpdatePartsListPropertiesRequest.PartProperties

FieldTypeLabelDescription
refDesstringrepeatedThe reference designator for each part to be updated. If not included, update properties for all parts in the CCA.
propertiesUpdatePartsListPropertiesRequest. PartProperties.PropertyrepeatedPart properties to be updated.

12.8.12.3. UpdatePartsListPropertiesRequest.PartProperties.Property

Table 12.193: UpdatePartsListPropertiesRequest.PartProperties.Property

FieldTypeLabelDescription
namestring Name of property to be updated.
valuestring Value to be applied to the chosen part property.

12.8.12.4. UpdatePartsListPropertiesResponse

Contains the status of the parts properties update as well as all the update error messages.

Table 12.194: UpdatePartsListPropertiesResponse

FieldTypeLabelDescription
returnCodeReturnCode Status code of response.
updateErrorsUpdatePartsListProperties Response.PartPropertyErrorrepeatedPart property update errors.

12.8.12.5. UpdatePartsListPropertiesResponse.PartPropertyError

Table 12.195: UpdatePartsListPropertiesResponse.PartPropertyError

FieldTypeLabelDescription
refDesstringoptionalThe reference designator of the part. Not set for invalid property name errors.
messagestring Error message when updating the part.

12.8.12.6. updatePartsListProperties

Proto Request Example
{
  "project": "Tutorial Project",
  "ccaName": "Main Board",
  "partProperties": [
    {
      "refDes": [
        "C1", "C2", "C3", "C4"
      ],
      "properties": [
        {
          "name": "partType",
          "value": "CAPACITOR CERAMIC"
        }
      ]
    }
  ]
}
Python Example:

For a Python example, refer to the online PySherlock Reference.

12.8.13. Update Parts Locations by File Request

12.8.13.1. UpdatePartsLocationsByFileRequest

Request to update one or more parts' locations using a CSV file.

Table 12.196: UpdatePartsLocationsByFileRequest

FieldTypeLabelDescription
projectstring Sherlock project name.
ccaNamestring The CCA name.
numericFormatstring Numeric format for the file. If not provided, it will default to "English (United States)".
filePathstring File that contains the components and location properties.

12.8.13.2. UpdatePartsLocationsByFileResponse

Contains the status of the parts locations update as well as all the update error messages.

Table 12.197: UpdatePartsLocationsByFileResponse

FieldTypeLabelDescription
returnCodeReturnCode Status code of response.
updateErrorstringrepeatedParts locations update error messages.

12.8.13.3. Examples: SherlockPartsService.updatePartsLocationsByFile()

Proto Request Example
{
  "project": "Tutorial Project",
  "ccaName": "Main Board",
  "numericFormat": "",
  "filePath": "C:\\Dir\\AM\\SHERLOCK\\Tutorial\\updatePartsLocations.csv"
}
Python Example

For a Python example, refer to the online PySherlock Reference.

12.8.14. UpdatePartsLocationsRequest

12.8.14.1. UpdatePartsLocationsRequest

Request to set a part's location.

Table 12.198: UpdatePartsLocationsRequest

FieldTypeLabelDescription
For display purposes, some strings in the second column are broken into multiple lines and should be read as continuous. For example, the last string should be interpreted as: UpdatePartsLocationsRequest.PartLocation
projectstring Sherlock project name.
ccaNamestring The CCA name.
partLocUpdatePartsLocations Request.PartLocationrepeated 

12.8.14.2. UpdatePartsLocationsRequest.PartLocation

Table 12.199: UpdatePartsLocationsRequest.PartLocation

FieldTypeLabelDescription
refDesstring Reference Designator of the part.
xstring Location of the part along the X axis.
ystring Location of the part along the Y axis.
rotationstring Orientation of the part on the board in degrees.
locationUnitsstring Unit of length for the part location. Supported values are IN, MM, M, MIL, MICRON, and NM.
boardSidestring Side of board on which the component exists. Supported values are TOP, BOT, and BOTTOM.
mirroredstring Indicates if the component is mirrored across the Y-axis. Supported values are Y, and N.

12.8.14.3. UpdatePartsLocationsResponse

Contains the status of the parts locations update as well as all the update error messages.

Table 12.200: UpdatePartsLocationsResponse

FieldTypeLabelDescription
returnCodeReturnCode Status code of response.
updateErrorstringrepeatedParts locations update error messages.

12.8.15. AVLDescription

Determines if the part description in the parts list will be updated by the AVL.

Table 12.201: AVLDescription

NameNumberDescription
AssignApprovedDescription0Assign approved description.
DoNotChangeDescription1Do not change description.

12.8.16. AVLPartNum

Determines what fields in the part list will get updated by the AVL.

Table 12.202: AVLPartNum

NameNumberDescription
AssignInternalPartNum0Assign internal part number.
AssignVendorAndPartNum1Assign vendor & part number.
DoNotChangeVendorOrPartNum2Do not change vendor / part number.

12.8.17. DuplicationMode

Determines what happens when there are duplicate matches for parts in the part list against parts in the AVL or Part Library.

Table 12.203: DuplicationMode

NameNumberDescription
First0Uses first matched when there is duplication.
Error1Generates an error when there is duplication.
Ignore2Ignore the matches when there is duplication.

12.8.18. MatchingMode

Determines how parts in the parts list are matched against parts in the AVL or Part Library.

Table 12.204: MatchingMode

NameNumberDescription
Both0Matches both part number and manufacturer.
Part1Matches part number only.