1
Python and Java API / Re: Set distances of scalebars via Python API
« on: June 02, 2022, 08:25:38 PM »
Thank you so much Alexey! It works fine now!
This section allows you to view all posts made by this member. Note that you can only see posts made in areas you currently have access to.
chunk.addScalebar(chunk.markers[0], chunk.markers[1])
chunk.addScalebar(chunk.markers[0], chunk.markers[2])
chunk.addScalebar(chunk.markers[0], chunk.markers[3])
chunk.addScalebar(chunk.markers[1], chunk.markers[2])
chunk.addScalebar(chunk.markers[1], chunk.markers[3])
chunk.addScalebar(chunk.markers[2], chunk.markers[3])
chunk.sortScalebars()
#Input distance of scalebars.
chunk.scalebars[0].Reference.distance = 0.03
chunk.scalebars[1].Reference.distance = 0.04
chunk.scalebars[2].Reference.distance = 0.05
chunk.scalebars[3].Reference.distance = 0.05
chunk.scalebars[4].Reference.distance = 0.04
chunk.scalebars[5].Reference.distance = 0.03
chunk.scalebars[0].label = "example_scalebar"