Macro to find text using coordinates in drawing
Macro to find text using coordinates in drawing
(OP)
Hi everyone,
I'm trying to write a macro (VBA) to extract some texts from a drawing view, save it into variables and then use it in another drawing.
The coordinates (X and Y) are the only text attributes that enables me to select the needed text among the other texts in the drawing.
I am not familiar with the "search" command but is there a way to find a text by its coordinates? For example, I need to select a text located between x = 100 and x = 120, and y = 20 and y = 30.
Thank you very much for your help.
Anthony
I'm trying to write a macro (VBA) to extract some texts from a drawing view, save it into variables and then use it in another drawing.
The coordinates (X and Y) are the only text attributes that enables me to select the needed text among the other texts in the drawing.
I am not familiar with the "search" command but is there a way to find a text by its coordinates? For example, I need to select a text located between x = 100 and x = 120, and y = 20 and y = 30.
Thank you very much for your help.
Anthony





RE: Macro to find text using coordinates in drawing
http://catia2.cad.de/index.php/de/tipps-tricks/pro...
to successfully run the code, you need to have a drawing open
regards,
LWolf
RE: Macro to find text using coordinates in drawing
Thanks for this very interesting link.
But I could not find a way to select what is inside this rectangle.
I finally found a way to solve my issue.
First, select all texts in the view.
Then access to the coordinates (x and y separately) thanks to "selection.item(i).value".
Best Regards,
Anthony