cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
Showing results for 
Search instead for 
Did you mean: 

Community Tip - If community subscription notifications are filling up your inbox you can set up a daily digest and get all your notifications in a single email. X

ISODRAW7.3 MACRO GET POSITION OF TEXT

jdias
5-Regular Member

ISODRAW7.3 MACRO GET POSITION OF TEXT

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 1
BLArts
8-Gravel
(To:jdias)

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

 

Top Tags