Adam Mircea

Add additional Note inside a Block (positioning problem)

Discussion created by Adam Mircea on Nov 7, 2018
Latest reply on Nov 12, 2018 by Adam Mircea

Hello all, i'm trying to add a note inside a block, where already exists a note.

 

This is what i need :

Start:

1.PNG

Result:

2.PNG

 

This is the code i'm testing :

 

'editing the block

boolstatus = swModel.Extension.SelectByID2(swFeature.Name & "-1", "SUBSKETCHINST", 0#, 0#, 0#, False, 0, Nothing, 0)

swModel.SketchManager.EditSketchBlock

 

'getting Note Position

pos = swNote.IGetTextPoint2

 

'inserting the others note

Set myNote = swModel.InsertNote("<FONT style=B><border type=9 size=0 padding=0>11</border>")

Set myAnnotation = myNote.GetAnnotation()

boolstatus = myAnnotation.SetPosition(pos(0) + 0.05, pos(1), pos(2))

 

Set myNote = swModel.InsertNote("<FONT style=B><border type=9 size=0 padding=0>123456789</border>")

Set myAnnotation = myNote.GetAnnotation()

boolstatus = myAnnotation.SetPosition(pos(0) + 0.05, pos(1) + 0.07, pos(2))

 

The problem is... that i can't understand how the position is working.
So when i'm trying to insert the new notes, the macro puts it completely away from my initial note. How can i fix this ? Have someone already seen this issue ?

 

Thank you for reading,

Adam.

Outcomes