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

Hole Note Formatted Text

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

WCrihfield
in reply to: johnster100

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)

johnster100
in reply to: WCrihfield

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

WCrihfield
in reply to: WCrihfield

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)