0

I am trying to create a program for automated screen capture in catia. For that I have to create a plane align camera to that plane and then reframe the camera to that plane. So i used the following code.

Dim selection1 as selection

Set Selection1=partdocument1.selection

selection1.add hybridshapeplanetangent1

Catia.startcommand("Normal View")

catia.refreshdisplay=true

selection1.clear

selection1.add hybridshapeplanetangetn1

Catia.startcomand("Reframe On")

Catia.RefreshDisplay= true

In this code normal to the plane is not working and it is only reframing I tried using Do events Catia.RefreshDisplay= true wait

1 Answers1

1

If you have the setting for "Tools->Options->General->Display->Navigation->Animation during viewpoint modification" turned on (the default) CATIA will probably execute the "Reframe On" command before it is done with the "Normal View" command. This will appear like the "Normal View" command was not executed.

You can turn off this setting manually, or let your code do it before you do view manipulations like this:

Dim controllers
Set controllers = CATIA.SettingsControllers
Dim attr
Set attr = controllers.Item("CATVizVisualizationSettingCtrl")
attr.ViewpointAnimationMode = false

... your code here ...

attr.ViewpointAnimationMode = true
C R Johnson
  • 964
  • 1
  • 5
  • 12
  • Thank you. i have to do little modifition `Dim cotrollers as settingcontrollers` it worked perfectly then. i was banging my head since long time. If you know any thing about capturing a part of screen please let me know. I have a question – Aatrox The Darkin Blade May 02 '18 at 04:10