VintaSoft Annotation .NET Plug-in Discussions

Questions, comments and suggestions concerning VintaSoft Annotation .NET Plug-in.

Board index < VintaSoft Imaging < VintaSoft Annotation .NET Plug-in Discussions

We are migrating to new forums engine, no new registration or posting currently available. TIA for your patience.

Winforms - Show distance value of the ruler annotation to a text field.



Winforms - Show distance value of the ruler annotation to a text field.

Post by markdhem »

Hi there,

How can I fetch the distance of the ruler annotation to a text field in C# just like the image below.

Thank you in advance. :)


Best Regards,
Mark


Re: Winforms - Show distance value of the ruler annotation to a text field.

Post by Alex »

Hi Mark,
How can I fetch the distance of the ruler annotation to a text field in C# just like the image below. URL to your image is broken, please add new image.

You can get the length of ruler using the RulerAnnotationData.Length property:
https://www.vintasoft.com/docs/vsimagin ... ength.html

You can get the unit of measure of ruler using the RulerAnnotationData.UnitOfMeasure property:
https://www.vintasoft.com/docs/vsimagin ... asure.html

Best regards, Alexander


Re: Winforms - Show distance value of the ruler annotation to a text field.

Post by markdhem »

Hi Alex,



Thanks for your reply,
Here is my screenshot, https://drive.google.com/open?id=18Qsda ... qt5M1SU6Li.

I actually got it at
annotationViewer1_AnnotationTransformingFinished
now but it will only appears the pixels value. What I want is the millimeters.
Here is my code.
foreach (AnnotationView view in annotationViewer1.SelectedAnnotations)
{
    // end the initialization of annotation view
    EndInit(view.Data);

    var size = view.Data.Size.Width;
    var mmSize = size ; //What is the formula here?
    textBox2.Text = mmSize.ToString();
}
Regards,
Mark


Re: Winforms - Show distance value of the ruler annotation to a text field.

Post by Alex »

now but it will only appears the pixels value. What I want is the millimeters. You can change the unit of measure using the RulerAnnotationData.UnitOfMeasure property:
https://www.vintasoft.com/docs/vsimagin ... asure.html

Best regards, Alexander


Page 1 from 1: 1