Lea75
Mechanical
- Feb 24, 2009
- 51
Dear all,
I need your help to find a solution for this issue.
I need to creat a macro that switches between 2 states of the active view mode in my Drawing: Exact View => Raster(with Shaging w/edges, and High Quality) => Exact view again
Here's my current code.
It changes the active view to RASTER, but I don't know how to change options to "Shading w/edges" and "Hight Quality"...
... then when I try to return to Exact View, the code turn off the Raster mode and change to CGR...
Any suggestion?
Set CATIA = GetObject(, "CATIA.Application")
If TypeName(CATIA.ActiveDocument) = "DrawingDocument" Then
If CATIA.ActiveDocument.Sheets.ActiveSheet.Views.ActiveView.GenerativeBehavior.ImageViewMode = catImageModeOff Then
CATIA.ActiveDocument.Sheets.ActiveSheet.Views.ActiveView.GenerativeBehavior.ColorInheritanceMode = cat3DColorInheritanceModeOn
CATIA.ActiveDocument.Sheets.ActiveSheet.Views.ActiveView.GenerativeBehavior.ImageViewMode = catImageModeHRD
CATIA.ActiveDocument.Sheets.ActiveSheet.Views.ActiveView.GenerativeBehavior.Update
Call calctemp(start_time)
Exit Sub
ElseIf CATIA.ActiveDocument.Sheets.ActiveSheet.Views.ActiveView.GenerativeBehavior.ImageViewMode = catImageModeHRD Then
CATIA.ActiveDocument.Sheets.ActiveSheet.Views.ActiveView.GenerativeBehavior.ColorInheritanceMode = cat3DColorInheritanceModeOff
CATIA.ActiveDocument.Sheets.ActiveSheet.Views.ActiveView.GenerativeBehavior.ImageViewMode = catImageModeOff
CATIA.ActiveDocument.Sheets.ActiveSheet.Views.ActiveView.GenerativeBehavior.Update
Call calctemp(start_time)
Exit Sub
End If
End If
I need your help to find a solution for this issue.
I need to creat a macro that switches between 2 states of the active view mode in my Drawing: Exact View => Raster(with Shaging w/edges, and High Quality) => Exact view again
Here's my current code.
It changes the active view to RASTER, but I don't know how to change options to "Shading w/edges" and "Hight Quality"...
... then when I try to return to Exact View, the code turn off the Raster mode and change to CGR...
Any suggestion?
Set CATIA = GetObject(, "CATIA.Application")
If TypeName(CATIA.ActiveDocument) = "DrawingDocument" Then
If CATIA.ActiveDocument.Sheets.ActiveSheet.Views.ActiveView.GenerativeBehavior.ImageViewMode = catImageModeOff Then
CATIA.ActiveDocument.Sheets.ActiveSheet.Views.ActiveView.GenerativeBehavior.ColorInheritanceMode = cat3DColorInheritanceModeOn
CATIA.ActiveDocument.Sheets.ActiveSheet.Views.ActiveView.GenerativeBehavior.ImageViewMode = catImageModeHRD
CATIA.ActiveDocument.Sheets.ActiveSheet.Views.ActiveView.GenerativeBehavior.Update
Call calctemp(start_time)
Exit Sub
ElseIf CATIA.ActiveDocument.Sheets.ActiveSheet.Views.ActiveView.GenerativeBehavior.ImageViewMode = catImageModeHRD Then
CATIA.ActiveDocument.Sheets.ActiveSheet.Views.ActiveView.GenerativeBehavior.ColorInheritanceMode = cat3DColorInheritanceModeOff
CATIA.ActiveDocument.Sheets.ActiveSheet.Views.ActiveView.GenerativeBehavior.ImageViewMode = catImageModeOff
CATIA.ActiveDocument.Sheets.ActiveSheet.Views.ActiveView.GenerativeBehavior.Update
Call calctemp(start_time)
Exit Sub
End If
End If