



Documentation Index
Fetch the complete documentation index at: /llms.txt
Use this file to discover all available pages before exploring further.
import SherlockPartsService_pb2
import SherlockPartsService_pb2_grpc
import SherlockLayerService_pb2
import SherlockLayerService_pb2_grpc
channel = grpc.insecure_channel('localhost:9090')
# Initialize the variables for the input parameter
project_name = “Tutorial Project”
cca = “Main Board”
my_component = “U6”
x = -0.25
y = 0.45
# Create a stub for the SherlockPartsService
stub = SherlockPartsService_pb2_grpc.SherlockPartsServiceStub(channel)
# Sets up the input parameters
message = SherlockPartsService_pb2.SetPartLocationRequest()
message.project = project_name
message.ccaName = cca
message.refDes = my_component
message.x = str(x)
message.y = str(y)
message.rotation = "0"
message.locationUnits = "IN"
# Executes the API
response = stub.setPartLocation(message)
# Create a stub for the SherlockLayerService
stub = SherlockLayerService_pb2_grpc.SherlockLayerServiceStub(channel)
# Deletes all mount points from the CCA
message = SherlockLayerService_pb2.DeleteAllMountPointsRequest()
message.project = project_name
message.ccaName = cca
response = stub.deleteAllMountPoints(message)
# Add Mount Points from file (filename can be dynamically generated to use different configurations)
num_mount_points = 6
mount_point_directory = "C:\\Temp\\”
filename = “mount_points_” + str(int(num_mount_points)) + “.csv”
message = SherlockLayerService_pb2.UpdateMountPointsRequest()
message.project = project_name
message.ccaName = cca
message.filePath = mount_point_directory + filename
# Please note that starting in 23.1 this API will be renamed to updateMountPointsByFile()
response = stub.updateMountPoints(message)




Was this page helpful?