I have an image that I want to apply a custom databar to via a script in DigitalMicrograph 3.21.1374.0. I would also like to apply a custom layout (separate question here: Apply Custom Layout to Image in DigitalMicrograph GMS3).
The procedure that I currently do by hand is:
- Right click on the image
- Hover on layout (in context menu)
- Left click "Add Databar"
- Select the custom databar in dialog that pops up (the one I want is called "CheckDataBar")
- Click OK
This works flawlessly - except that I would like to run a script to do it (so I can loop all the open images and apply the databar).
Here is the code that I have so far to do just one image:
//main - get front image and apply custom databar
image Img := GetFrontImage()
imageDisplay imgDisplay = Img.ImageGetImageDisplay(0)
ApplyDataBar(imgDisplay)//this only adds the scale bar not the custom databar that i would like
I have tried ApplyDataBar(imgDisplay, CheckDataBar)
but that does not work.
Any ideas?