Hey ser1993, you can do this quite easily with the python api if you are familiar with it. Here is an example. I auto-detect 3 circular 12bit markers which are each 1 meter apart. Once the markers are detected you can use the python api to automatically create scale bars. Here is my code below:
def create_scale_bars(self):
print('Creating scale bars...')
marker1, marker2, marker3 = None, None, None
for marker in self.chunk.markers:
if marker.label == 'target 1':
marker1 = marker
elif marker.label == 'target 2':
marker2 = marker
elif marker.label == 'target 3':
marker3 = marker
distance = 1.0
if marker1 and marker2 and marker3:
scale_bar1 = self.chunk.addScalebar(marker1, marker2)
scale_bar1.reference.distance = distance
print(f'Scale bar of {distance}m added between "target 1" and "target 2"')
scale_bar2 = self.chunk.addScalebar(marker1, marker3)
scale_bar2.reference.distance = distance
print(f'Scale bar of {distance}m added between "target 1" and "target 2"')
else:
print("Markers not found")
self.doc.save()