Running v5 or 3dx?

#vba #v5 #3dx

Maybe you are working with Catia V5 and 3DEXPERIENCE on a daily basis depending on customers needs. Most of the API is common for both aplications but some of the key methods are different. In order to reuse the code for both aplications, you can check the version and depending on it follow a diference code path.

Dim CatiaVersion As Long
CatiaVersion = CATIA.System.Configuration.Version 

If CatiaVersion = 5 Then
    ' Put your V5 code here

ElseIf CatiaVersion = 6 Then
    ' Put your 3dx code here

End If