Skip to main content
1-Visitor
October 14, 2011
Question

How to change the distance between text elements?

  • October 14, 2011
  • 1 reply
  • 1435 views

Good morning,

I am using Isodraw 7.1, below is the whole task and the help section is my main query. I should be able to make the rest fo the macro.

Task

I need to find a text element with certain text inside and then check the distance between this text element and the next text element directly below this. If the distance does nto match a specific number then it needs to be modified.

Help

  1. Does anyone know if it is possible to detect the next text element directly below the currently selected text element?
  2. Can the distance between these 2 text elements be measured?

Thank you for your time

Alan

    1 reply

    1-Visitor
    October 14, 2011

    Hi Alan.

    2. For any element you can get the surrounding box. E.g.
    y_dist = elem1.box.bottom - elem2.box.top

    1. I would try select a rectangle below your first text. E.g.
    Select Rectangle x1 (y+d1) x2 (y+d2) WITH_PARTIAL
    # To sort out other element types:
    SubSelect If Type is equal to "Text"

    Cheers, Benno