Message 1 of 5
Error during access Camera into DrawingView
Not applicable
09-24-2007
10:01 PM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report
Hi!
I try to get camera object for selected drawing view. I use vba macro for this (below) and in string "set oCam = oView.Camera" i get Run-time error 445 Object doesnot support this action. How to solve this situation?
Dim oSelectSet As SelectSet
Set oSelectSet = ThisApplication.ActiveDocument.SelectSet
' Check to make sure a single item was selected.
If oSelectSet.Count = 1 Then
' Check to make sure a face was selected.
If TypeOf oSelectSet.Item(1) Is DrawingView Then
' Set a reference to the selected face.
Dim oView As DrawingView
Set oView = oSelectSet.Item(1)
MsgBox oView.Name
Dim oCam As Camera
set oCam = oView.Camera
End If
Else
MsgBox "You must select a single drawing view."
Exit Sub
End If
I try to get camera object for selected drawing view. I use vba macro for this (below) and in string "set oCam = oView.Camera" i get Run-time error 445 Object doesnot support this action. How to solve this situation?
Dim oSelectSet As SelectSet
Set oSelectSet = ThisApplication.ActiveDocument.SelectSet
' Check to make sure a single item was selected.
If oSelectSet.Count = 1 Then
' Check to make sure a face was selected.
If TypeOf oSelectSet.Item(1) Is DrawingView Then
' Set a reference to the selected face.
Dim oView As DrawingView
Set oView = oSelectSet.Item(1)
MsgBox oView.Name
Dim oCam As Camera
set oCam = oView.Camera
End If
Else
MsgBox "You must select a single drawing view."
Exit Sub
End If