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

ISODRAW7.3 MACRO GET POSITION OF TEXT

jdias
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

 

Tags (1)
1 REPLY 1

Re: ISODRAW7.3 MACRO GET POSITION OF TEXT

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

 

Announcements