Hey Peoples,
Happy Monday to you all. I have been attempting all day to try and create a macro that will rename the first drawing view to "Drawing View1" with no luck. I've scoured the internets in search of a solution but have come up with very little. The main issue I am having is that I'm not sure what exactly I am searching for in the tree. I tried using the swDrawingViewTypes_e to find something but havent been able to get it to work. Ive posted a couple of failed attempts below, mainly cobbled from other similar things.
Thanks in advance for any help,
Trevor
'Set swView = swDraw.GetFirstView
'While Not swView Is Nothing
'If swView <> swDrawingViewTypes_e.swDrawingSheet Then
'Else
' swView.SetName2 ("Drawing View1")
' End If
'swView = swView.GetNextView
'End While
'swView.Name = "Drawing View1"
___________________________________________________________________________________
vViews = swSheet.GetViews
For i = 0 To UBound(vViews)
Set swView = vViews(i)
Select Case swView.Type
Case swDrawingViewTypes_e.swDrawingNamedView
swView.GetName2 = "chubsy ubsy"
MsgBox ("Winner")
'Dim swDrawingStandardView As SldWorks.View
'swDrawingStandardView.SetName2 = "chubsy ubsy"
End Select
Next
SolidworksApi macros