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

Hole Note Formatted Text

johnster100
Collaborator

Hole Note Formatted Text

johnster100
Collaborator
Collaborator

Hi,

i'm trying to add a PCD to my hole note by adding a model parameter to the formatted text.

 

oHoleNote.Text.FormattedText= ""<DimensionValue/> <Br/>ON PCD Ø<Parameter Resolved='True' ComponentIdentifier='C:\PartFile.ipt' Name='TestParameter' Precision='0'>10</Parameter>"" 

 

When i do this it crashes in version 2019 but works in version 2020. 

 

Is there another way i can achieve this in version 2019? (my business unit is currently using version 2019)

 

thanks,

John

0 Likes
Reply
455 Views
3 Replies
Replies (3)

WCrihfield
Mentor
Mentor

If you edit the hole note manually to the way you want it in 2019 does it crash or give you any errors?

If not, try this:

Edit a hole note the way you want it manually, then using an InputBox code from an iLogic rule, with the oHoleNote.Text.FormattedText as the 'default response' entry at the end of the InputBox code.  This will show you the fully selectable & copyable formatted text. Then copy that to use within your code.

Wesley Crihfield

EESignature

(Not an Autodesk Employee)

0 Likes

johnster100
Collaborator
Collaborator

Yeah I've tried doing that and it still crashes :disappointed_face:

0 Likes

WCrihfield
Mentor
Mentor

Like this:

Dim oHoleNote As HoleThreadNote = ThisApplication.CommandManager.Pick(SelectionFilterEnum.kDrawingDefaultFilter, "Select a HoleThreadNote.")
If oHoleNote Is Nothing Then Return
InputBox("Here is the selectable contents of oHoleNote.Text.FormattedText.", "Formatted Text", oHoleNote.Text.FormattedText)

Wesley Crihfield

EESignature

(Not an Autodesk Employee)

0 Likes