×
INTELLIGENT WORK FORUMS
FOR ENGINEERING PROFESSIONALS

Log In

Come Join Us!

Are you an
Engineering professional?
Join Eng-Tips Forums!
  • Talk With Other Members
  • Be Notified Of Responses
    To Your Posts
  • Keyword Search
  • One-Click Access To Your
    Favorite Forums
  • Automated Signatures
    On Your Posts
  • Best Of All, It's Free!
  • Students Click Here

*Eng-Tips's functionality depends on members receiving e-mail. By joining you are opting in to receive e-mail.

Posting Guidelines

Promoting, selling, recruiting, coursework and thesis posting is forbidden.

Students Click Here

Jobs

Catia Macro: Get Screen Coordinates of All items in Drawing View

Catia Macro: Get Screen Coordinates of All items in Drawing View

Catia Macro: Get Screen Coordinates of All items in Drawing View

(OP)
I am in the process of creating BOM Ballons Macro. I am doing it hard way i.e.

1.Start.Command "Balloon"
2. Move Mouse Cursor to Drawing View Area (SetCursorPos WinApi)
3. Simulate Click Event (mouse_event WinApi)
4. Move Mouse Again
5. Simulate Click Event
6. Sendkeys "{Enter}"

I need to do it for each and every item for which I have to create balloons. Now the problem is how to get screen co-ordinates (i.e. x,y coordinates from top left of monitor screen) for each and every part for balloon creation ?

See Attached Picture for more info

Is it possible somehow ?? Please help.

RE: Catia Macro: Get Screen Coordinates of All items in Drawing View

(OP)
BUMP
Anybody please help

RE: Catia Macro: Get Screen Coordinates of All items in Drawing View

Hello JajAndeep,

Here are some thoughts on how you can deel with your problem. You need to use Windows API functions and a programming language which can deal with graphics (.NET languages can do that).

Step O: Create two Bitmap object (lets call them Base and Aux)and store an image of your drawing area in Base. Start Ballon command.
Step 1: Move mouse to the first/next black pixel of Base. On the screen some pixels will turn to orange color.
Step 2: Store an image of your drawing area in Aux.
Step 3. Compare Aux to Base and set the changed pixels to a specific, but in each loop different, color in Base.
Step 4. Loop to Step 1 until end of Base object.
Step 5. For each different color in Base choose a pixel and click on it.

(In the past I used a graphics processing method to deal with the Specification Tree of CATIA.)

I hope it helps.

-GEL

Imposible is nothing

Red Flag This Post

Please let us know here why this post is inappropriate. Reasons such as off-topic, duplicates, flames, illegal, vulgar, or students posting their homework.

Red Flag Submitted

Thank you for helping keep Eng-Tips Forums free from inappropriate posts.
The Eng-Tips staff will check this out and take appropriate action.

Reply To This Thread

Posting in the Eng-Tips forums is a member-only feature.

Click Here to join Eng-Tips and talk with other members!


Resources