09-23-2020
02:03 AM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report
09-23-2020
02:03 AM
Hi,
How can I keep the DrawingBaseViewCmd visible, to give the user the possibility to directly change drawing view settings.
Part of ilogic code:
sFileName = oPartTest.FullFileName ThisApplication.CommandManager.PostPrivateEvent(kFileNameEvent, sFileName) oTest = ThisApplication.CommandManager.ControlDefinitions.Item("DrawingBaseViewCmd") oTest.Execute
Solved! Go to Solution.
09-23-2020
01:29 PM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report
09-23-2020
01:29 PM
hi, does this work or you?
Dim doc As DrawingDocument = ThisApplication.ActiveDocument ' Make a list of the views. For use later Dim knowViews As List(Of String) = New List(Of String) For Each view As DrawingView In doc.ActiveSheet.DrawingViews knowViews.Add(View.Name) Next ' Create a drawingview Dim sFileName = oPartTest.FullFileName ThisApplication.CommandManager.PostPrivateEvent(PrivateEventTypeEnum.kFileNameEvent, sFileName) Dim oTest = ThisApplication.CommandManager.ControlDefinitions.Item("DrawingBaseViewCmd") oTest.Execute2(True) ' find the view that was just added and (re)start command For Each view As DrawingView In doc.ActiveSheet.DrawingViews If (knowViews.Contains(View.Name) = False) Then doc.SelectSet.Clear() doc.SelectSet.Select(View) ThisApplication.CommandManager.ControlDefinitions.Item("DrawingViewEditCtxCmd").Execute() Exit For End If Next
Jelte de Jong
Did you find this post helpful? Feel free to Like this post.
Did your question get successfully answered? Then click on the ACCEPT SOLUTION button.
Blog: hjalte.nl - github.com
09-23-2020
11:34 PM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report