Relocating Dimensions in Drawings

I'm having an issue with the program I'm working on and I'm hoping you can help. I just need to move an existing dimension to a new location. I'm trying to selectbyID2 and then setposition but I keep getting errors.


Dim swApp As Object

Dim Part As Object

Dim SelMgr As Object

Dim boolstatus As Boolean

Dim longstatus As Long, longwarnings As Long

Dim Feature As Object

Dim Annotation as IAnnotation

Sub main()


Set swApp = Application.SldWorks


Set Part = swApp.ActiveDoc

Set SelMgr = Part.SelectionManager

boolstatus = Part.ActivateView("Drawing View2")

boolstatus = Part.Extension.SelectByID2("RD4@Drawing View2", "DIMENSION", 0, 0, 0, False, 0, Nothing, 0)

boolstatus = annotation.setposition(0.1,0.1,0)

End Sub

Thanks,


Stephan

SolidworksApi macros