cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

Add GetResultText Method in Inventor API for DrawingNote (and similar objects)

Add GetResultText Method in Inventor API for DrawingNote (and similar objects)

In Inventor, there are lots of situations where we can manually use the ‘Format Text’ dialog while specifying the text that we want to be displayed.  In that dialog, we have a set of controls just above the text box for dropping in a ‘pointer’ to data defined outside of that object.  It might be an iProperty, a Parameter, or something else that we want to include the value of within the text.  When we drop that pointer into the Format Text dialog, we just see a ‘label’ for that data, inside a set of ‘angle brackets’ (< & >).  When we access this object by code, the object usually has a Property named ‘Text’ and another Property named ‘FormattedText’, but no Property named something like 'Value' or 'ResultText'.  The Property named FormattedText usually contains some ‘XML Tags’ used for defining all the special formatting that is being applied to the text, and information about what & where these ‘Links’ or pointers are pointing to.  The Property named Text just contains the same thing that we see in the Format Text dialog, including the 'bracketed' label of the data we want to be retrieved into the text, but does not contain the 'retrieved value' of the pointer.

 

There does not appear to be any way to get the actual, final, resulting text, containing the 'retrieved values' of the pointers, like we see in the user interface (not in the dialog).  There does not even appear to be a ‘method’ (Function) anywhere for retrieving that final, resulting value.  But we can visually ‘see’ its retrieved value when we look at the note in the user interface.

 

We need a ‘Method’ (Function) for retrieving that resulting value…the value that we will see in the user interface when everything is finished.

 

We already have a method named ‘GetResultText’ for retrieving the value of a ‘Prompted Entry’ from objects like the Inventor.Border (Border.GetResultText), Inventor.TitleBlock (TitleBlock.GetResultText), and Inventor.SketchedSymbol (SketchedSymbol.GetResultText), where it asks us to specify the Inventor.TextBox object retrieved from within the object's ‘definition’ sketch that represents the Prompted Entry.  But we do not have a way of retrieving the resulting data from any of the other data sources that we can create pointers for in our notes.  Besides those 3 object types and their associated methods, there do not appear to be any other methods for retrieving any 'resulting text data' from any other types of objects that can contain those types of 'pointers' in their text.  The common Inventor.DrawingNote for example.  Most other types of 'notes' in a drawing are derived from that base type, so they all have the same Property named 'FormattedText' as it does.  But none of them have either a Property or a Method for getting the final, resulting value which includes any 'retrieved' data in it.  Please fix this sooner, rather than later.

 

If this method can not be associated with an Inventor.DrawingNote object (or similar type of object which is capable of containing text) in a drawing, then make it a method of the Inventor.Sheet object which owns or contains the DrawingNote object.  And if that is not possible, then make it a method of the Inventor.DrawingDocument object which owns / contains the DrawingNote object.  And if that won’t work, make it a method of the main Inventor.Application object.  At some point, there has to be a way to get that information, if it is getting displayed in the user interface.

Inventor Format Text Dialog.png

Can't find what you're looking for? Ask the community or share your knowledge.

Submit Idea