Message 1 of 7
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report
Hi all,
I try to get a balloon in an idw to switch styles upon selecting it and pressing my shortcut.
I tried the following ilogic rule and many variations of it. What am I doing wrong, can somebody help?
Public Class switchPosStyle Public Sub Main Dim oDocument As DrawingDocument = ThisApplication.ActiveDocument If oDocument.DocumentType <> kDrawingDocumentObject Then Exit Sub Else If oDocument.SelectSet.Count <> 1 Then Exit Sub Else If Not TypeOf oDocument.SelectSet.Item(1) Is Balloon Exit Sub Else For Each styleItem As BalloonStyle In oDocument.StylesManager.BalloonStyles If styleItem.Name = ("StyleNameIwantToSwitchTo") Then oDocument.SelectSet.Item(1).Style = styleItem End If Next End If End Sub End Class
The styles are definitly available in the idw.
Thank you!
Solved! Go to Solution.