Can't get Thread Note to Move

Can't get Thread Note to Move

shastu
Advisor Advisor
236 Views
2 Replies
Message 1 of 3

Can't get Thread Note to Move

shastu
Advisor
Advisor

When I try to Set the objPoint2D to the new origin, it doesn't update to the new numbers 5,6. (line 14).  Also, Once I do get it to update, how do I execute it.  oHN.position is not a thing like it would be for a drawing view.

 

Dim oDDoc As DrawingDocument
Set oDDoc = ThisApplication.ActiveDocument
Dim oSheet As Sheet
Set oSheet = oDDoc.ActiveSheet
Dim oHoleNotes As HoleThreadNotes
Set oHoleNotes = oSheet.DrawingNotes.HoleThreadNotes
Set objPoint2D = Nothing
Dim dPosition As Double
Dim oHN As HoleThreadNote
If oHoleNotes.count > 0 Then
For Each oHN In oHoleNotes
oHN.Text.Origin.x = 5
oHN.Text.Origin.y = 6
Set objPoint2D = ThisApplication.TransientGeometry.CreatePoint2d(oHN.Text.Origin.x, oHN.Text.Origin.y)
'move hole note text to x,y
Next
End If

0 Likes
Accepted solutions (1)
237 Views
2 Replies
Replies (2)
Message 2 of 3

tyler.warner
Advocate
Advocate
Accepted solution

This is only moving the text, not the actual hole note attachment line, but it completes your ask above. Similar to your other forum discussion. Just add "Set" as needed to go from iLogic (VB.NET) to VBA.

 

For Each oHN In oHoleNotes
	Dim oPosition As Point2d
	oPosition = oHN.Text.Origin
	oPosition.X = 5
	oPosition.Y = 6
	oHN.Text.Origin = oPosition
	objPoint2D = ThisApplication.TransientGeometry.CreatePoint2d(oHN.Text.Origin.X, oHN.Text.Origin.Y)
	'move hole note text to x,y
Next

 

If this solved your problem or answered your question, please click ACCEPT SOLUTION.
If this helped you, please click LIKE.
0 Likes
Message 3 of 3

shastu
Advisor
Advisor

Thank you so much.  I knew I was close, just couldn't quite figure out what I was missing.

0 Likes