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

Community Tip - Have a PTC product question you need answered fast? Chances are someone has asked it before. Learn about the community search. X

How to select only projected text in macro???

FrancisPaille
7-Bedrock

How to select only projected text in macro???

Hi everybody, if they have somebody who can help me to solve this probleme, it would be much apreciated.

I try to select all projected text in illustration like text inside directional arrow, and from this macro a would be able to convert to path all selected text, to make sure it will not tilt on our publishing system.

Thanks!!!

10 REPLIES 10

Can you provide a sample file?

Hi Trevor, first of all thanks for your help it is much apreciated.

Because we can't upload an iso file when we reply, a createa new post called

How to select only projected text in macro??? (post 2 with file attached)

With file attach with comment.

Again... Many thanks!!!

Hello!

To attach a file to the message, use the option "Use advanced editor".

Pic_1.jpg

I was seaching this tool without founding... may be i have an eyes problem!!!

Thanks!

No problem.

Hi everybody,

there is in my file, an exemple of what i am trying to do.

the macro should take only text converted by using projection and convert them to path.

They need to let all other text intact, for future correction or revision.

Thanks for idea or solution!

Hello Francis Paille,

This macro is based on the example which you have provided,

So based on the text "FWD" I made this macro.

Macro Projected_FWD

Define el as element

Define el_count as integer

Define a as float

Define b as float

Define c as float

Define d as float

Define height as integer

Select if Text is equal to 'FWD'

el_count = ActiveDoc.selectedElements

el = activeDoc.firstSelectedElement

Define i as integer

For i = 1 to el_count

if (exists(el) = true) then

a = el.box.left

b = el.box.top

c = el.box.right

d = el.box.bottom

height = (b - d)

If (height > 4) then

Select Rectangle a b c d with_partial direct

SubSelect if Type is equal to 'text'

Convert text to paths

Else

Select Rectangle a b c d with_partial direct

Lock selection

End If

Select none

Select if Text is equal to 'FWD'

el = activeDoc.firstSelectedElement

End If

End For

Unlock all

Select none

End Macro

------using this you can create macro for other projected text

Thanks,

Vaduga

Hi Vaduga,

It work well, but only with fwd. In my case, it should work for any words rotated or flip in projection plan...

I whant to create this macro to prevent having probleme in our publishing system (QuickSilver), it take all text projected and also rotated text and do something like delete transormation, they take text and flip back

at the nearest 90deg axis and without keeping projection.

Hi Francis,

The above programme is based on the height of the text.

So based on the height of the text you use in yor illustration you must write similar programme.

Thanks,

Vaduga

Hi.

you can check if the text element is transformed by checking if its matrix

is the identity matrix. This can be written short like this:

IF (el.text.matrix=" 1 0 0 0 1 0 0 0 1")

Please note the trailing space when comparing the matrix as a string!

Top Tags