How to Extract Contents, and X Y Coordinates, of Text Boxes from .CATDrawing by Macro
How to Extract Contents, and X Y Coordinates, of Text Boxes from .CATDrawing by Macro
(OP)
Hello All,
I am new to the forum, and have very little experience with CATIA Macro writing (Most of my basic experience comes VB for EXCEL Macros). I am looking for some help in this area...
I have a CATIA Drawing with a Table created by Geometry and Text (The Table is made of Points, Lines, Shapes, and Text Boxes instead of using the CATIA Table Tool).
My Goal is to create Excel data duplicating the information in the 'Graphical' the Drawing Table.
I feel like this a perfect task for CATIA VB Macros but I'm having trouble getting started.
I am able to piece together some MACRO functions from my internet searches.
The key MACRO functions I'm not able to find information on are:
Getting the XY coordinates of the TEXT BOXES, and the contents of the TEXT BOXES, into a EXCEL style list.
Can someone please point me in the right direction?
Thank you in advance for your help!
I am new to the forum, and have very little experience with CATIA Macro writing (Most of my basic experience comes VB for EXCEL Macros). I am looking for some help in this area...
I have a CATIA Drawing with a Table created by Geometry and Text (The Table is made of Points, Lines, Shapes, and Text Boxes instead of using the CATIA Table Tool).
My Goal is to create Excel data duplicating the information in the 'Graphical' the Drawing Table.
I feel like this a perfect task for CATIA VB Macros but I'm having trouble getting started.
I am able to piece together some MACRO functions from my internet searches.
The key MACRO functions I'm not able to find information on are:
Getting the XY coordinates of the TEXT BOXES, and the contents of the TEXT BOXES, into a EXCEL style list.
Can someone please point me in the right direction?
Thank you in advance for your help!





RE: How to Extract Contents, and X Y Coordinates, of Text Boxes from .CATDrawing by Macro
indocti discant et ament meminisse periti
RE: How to Extract Contents, and X Y Coordinates, of Text Boxes from .CATDrawing by Macro
I found this:
o Property x( ) As double
Returns or sets the x coordinate of the text. It is expressed with respect to the current view coordinate system. This coordinate, like any length, is measured in meters.
Example:
This example retrieves the x coordinate of the text MyText drawing text.
X = MyText.x
o Property y( ) As double
Returns or sets the y coordinate of the text. It is expressed with respect to the view coordinate system. This coordinate, like any length, is measured in meters.
Example:
This example sets the y coordinate of the text MyText drawing text to 5 inches. You need first to convert the 5 inches into meters.
NewYCoordinate = 5*25.4/1000
MyText.y = NewYCoordinate
you can also searc for catscript or catvbs and see several example codes.
RE: How to Extract Contents, and X Y Coordinates, of Text Boxes from .CATDrawing by Macro
Any mini-code examples, or breadcrumbs to steer me in the right direction, is much appreciated!