Charlie
Mechanical
- Dec 28, 2015
- 15
I have made this program in VBA and i am getting color value of background but it showing compile error there that"Function or interface marked as restricted or the function uses an automation type not supported in visual basic".Can you give the reason of error??
This is working in CATScript but giving error in VBA
My program is as below
Sub CATMain()
Dim backgroundview As Viewer3D
Set backgroundview = CATIA.ActiveWindow.ActiveViewer
'get the value of background color
Dim color(2)
backgroundview.GetBackgroundColor (color)
MsgBox color(0)
MsgBox color(1)
MsgBox color(2)
End Sub
This is working in CATScript but giving error in VBA
My program is as below
Sub CATMain()
Dim backgroundview As Viewer3D
Set backgroundview = CATIA.ActiveWindow.ActiveViewer
'get the value of background color
Dim color(2)
backgroundview.GetBackgroundColor (color)
MsgBox color(0)
MsgBox color(1)
MsgBox color(2)
End Sub