I'm trying to write a Macro that flip flops the placement of the quantity on the selected balloon notes. This macro will be mapped to a hotkey as an improvement to my workflow. I've figured out which API commands to use, however, I cannot get them to work with one another. The idea of the program is after the balloon is selected is to determine which side the quantity is placed on, and then switch the placement to the opposite side. I'm getting hung up on the determining which side the quantity is on part, which is posted below. It throws a mismatch error and the documentation is not very helpful. Can y'all provide some guidance?
Dim swApp As SldWorks.SldWorks
Dim swModel As SldWorks.ModelDoc2
Dim swModelDocExt As SldWorks.ModelDocExtension
Dim swSelMgr As ISelectionMgr 'SldWorks.SelectionMgr
Dim swNote As Object
Dim place As Integer
Set swApp = Application.SldWorks
Set swModel = swApp.ActiveDoc
Set swModelDocExt = swModel.Extension
Set swSelMgr = swModel.SelectionManager
' Get the selected balloon
Set swNote = swSelMgr.GetSelectedObject6(1, -1)
place = swNote.QuantityPlacement
' Here goes the flp flop logic'