Hole Note Formatted Text

Hole Note Formatted Text

johnster100
Collaborator Collaborator
499 Views
3 Replies
Message 1 of 4

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
500 Views
3 Replies
Replies (3)
Message 2 of 4

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
Message 3 of 4

johnster100
Collaborator
Collaborator

Yeah I've tried doing that and it still crashes 😞

0 Likes
Message 4 of 4

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