I have been able to extract with VBScript all the viewpoints from a NWD model like the example shows, but I'm wondering if the folder structure can be referenced the same way. I would like to group my saved viewpoints by folder on the webpage.
Solved! Go to Solution.
Solved by xiaodong_liang. Go to Solution.
Hi,
Do you want to access the folder and the view points within it? If yes, following is some small code.
Private Sub recurseFolderView(view As InwOpFolderView)
Dim eachView As InwOpSavedView
Dim oFolderView As InwOpFolderView
For Each eachView In view.SavedViews
If eachView.Type = eSavedViewType_Folder Then
Debug.Print eachView.Name & "is a folder"
Set oFolderView = eachView
recurseFolderView oFolderView
Else
MsgBox "next view " & eachView.Name
m_state.ApplyView eachView
End If
Next
End Sub
Private Sub ApplyViewWithEachSavedView()
Dim savedview As InwOpSavedView
Dim oFolderView As InwOpFolderView
For Each savedview In m_state.SavedViews
If savedview.Type = eSavedViewType_Folder Then
Set oFolderView = savedview
recurseFolderView oFolderView
Else
MsgBox "next view " & savedview.Name
m_state.ApplyView savedview
End If
Next
Regards,
Xiaodong Liang
Developer Technical Services
I am using VBScript and the redistributable API inside a webpage for this project and I'm having difficulty referencing the nested views to change them programmatically. The InwOPSavedView.nwID property gives me a permission denied error, so I am unsure how to find a particular view once I've wrote a list to my website. The only way I can think to find the view again is to loop back over the views and match them by name, which will be problematic if there are two with the same name. Is there another way I'm not seeing?
In an stateless environment like a browser, how am I supposed to find a SavedView again using the Unlicensed API? (Redistributable ActiveX control)
Can't find what you're looking for? Ask the community or share your knowledge.