Announcements
Attention for Customers without Multi-Factor Authentication or Single Sign-On - OTP Verification rolls out April 2025. Read all about it here.
Anonymous
376 Views, 1 Reply

Create Leader Note with the properties model- part number

Hi, i was trying to create an automated annotation tag but through ilogic but this is what i have so far..

 

Dim oDoc As DrawingDocument
oDoc = ThisApplication.ActiveDocument
Dim s As String
s = "<StyleOverride Font='Arial'><Parameter Resolved='True' ComponentIdentifier='C:\Users\hanb\Documents\Disc.ipt' Name='HoleQuantity' Precision='0'>8</Parameter></StyleOverride><StyleOverride Font='Arial'> HOLES ON DIA </StyleOverride><StyleOverride Font='Arial'><Parameter Resolved='True' ComponentIdentifier='C:\Users\hanb\Documents\Disc.ipt' Name='HolePCD' Precision='0'>35</Parameter></StyleOverride><StyleOverride Font='Arial'>±0.1 </StyleOverride><Br/><StyleOverride Font='Arial'>WITH </StyleOverride><StyleOverride Font='Arial'><Parameter Resolved='True' ComponentIdentifier='C:\Users\hanb\Documents\Disc.ipt' Name='HoleQuantity' Precision='0'>8</Parameter></StyleOverride><StyleOverride Font='Arial'> DIVISIONS</StyleOverride>"
 
Dim curve As DrawingCurve
curve = oDoc.SelectSet.Item(1).Parent
Dim oGI1 As GeometryIntent
oGI1 = oDoc.ActiveSheet.CreateGeometryIntent(curve, kCenterPointIntent)
 
Dim pt As Point2d
pt = ThisApplication.TransientGeometry.CreatePoint2d
 
pt.X = curve.CenterPoint.X + 3
pt.Y = curve.CenterPoint.Y + 5
 
Dim oObjCol As ObjectCollection
oObjCol = ThisApplication.TransientObjects.CreateObjectCollection
oObjCol.Addpt
oObjCol.AddoGI1
 
Dim oLN As LeaderNote
' create a LeaderNote.
oLN = oDoc.ActiveSheet.DrawingNotes.LeaderNotes.Add(oObjCol, "")
oLN.FormattedText = s