Skip to main content
1-Visitor
July 9, 2020
Question

ISODRAW7.3 MACRO GET POSITION OF TEXT

  • July 9, 2020
  • 1 reply
  • 1363 views

Hi, using ISODROW7.3

i need to get in messagebox the position X,Y of text.

I tried this but it 's not running, please can you help me

DEFINE el AS Element
Select IF Type is equal to "Text"
el = activeDoc.firstSelectedElement
WHILE (Exists (el) = true )
define a as string

define b as string
a = el.position.x.string

b= el.position.y.string
message a + b

 

1 reply

12-Amethyst
February 16, 2021

This will work. ðŸ™‚

 

global EleGlobal AS Element

Macro Testing
	Select IF Type is equal to "Text"
	EleGlobal = activeDoc.firstSelectedElement
		WHILE (Exists (EleGlobal) = true)
	DEFINE sx as Integer
	DEFINE sy as Integer
	sx = EleGlobal.text.startPoint.x
	sy = EleGlobal.text.startPoint.y
	MESSAGE "startPoint.x = " + sx + $Newline + "startPoint.y = " + sy
	DISPOSE sx
	DISPOSE sy
	EleGlobal = EleGlobal.nextSelectedElement
		END while
End macro