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!

*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.


CATIA VBA macro for comparing 2 CATParts

CATIA VBA macro for comparing 2 CATParts


I wanted to write a catia macro for comparing 2 CATParts using SPA Analysis compare method.

1: Macro should ask user to select 2 part.
2: Areas where both matches, should be in yellow color.

There are some sample code in documentation, but they are not working in CATIA V5R25. Will *.3DMap file work in R25? if not, what are the alternatives?

Dim var11(0)
var11(0) = "C:\Comparison\AddedMaterial" & myDate & ".3dmap"
products1.AddComponentsFromFiles var11, "*"


RE: CATIA VBA macro for comparing 2 CATParts

Will be useful. I believe licence will be required for that.

Jenia Ladkov

RE: CATIA VBA macro for comparing 2 CATParts

Hello Jenia,

Yes, SPA license may be required.


RE: CATIA VBA macro for comparing 2 CATParts

did you try compare product function?

if you're missing CATIA API, you can always use Win API to interact with the function.

Eric N.
indocti discant et ament meminisse periti

RE: CATIA VBA macro for comparing 2 CATParts

Thank you Fernando and Eric,

Very good information from both of you.

I was trying to figure out if there is any CATIA API to do visual comparison to avoid WIN API. Also there are annotation captures in both the versions of part. I need to compare solid along with annotation, take a grab and put into ppt.

So even if I go with WIN API, I am not sure if each capture can be compared along with solid differences.

Currently I am following few steps
1. Add both parts in product
2. change 1st part color to green
3. change 2nd part color to red
4. display capture one by one
5. take a screen shot.

But if there is not difference in annotations, color is only red. So brings the question if any text is removed in new version , is it hidden and not known?

If I move one of the part by .1,.1,.1, then I cannot compare solid correctly?

Please suggest


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!


eBook: Metal 3D Printing
Metal can provide strength like no other material can and, throughout our history on Earth, humans have learned to harness metals for ever greater specialized applications, from radiation shielding on spacecraft to conductive components on circuits. Download Now

Close Box

Join Eng-Tips® Today!

Join your peers on the Internet's largest technical engineering professional community.
It's easy to join and it's free.

Here's Why Members Love Eng-Tips Forums:

Register now while it's still free!

Already a member? Close this window and log in.

Join Us             Close