Reading prompted values in sketched symbols

Reading prompted values in sketched symbols

Anonymous
Not applicable
360 Views
2 Replies
Message 1 of 3

Reading prompted values in sketched symbols

Anonymous
Not applicable
In Inventor 11 and previous, I wrote a macro that read existing values from prompted text fields in sketched symbols. I was able to get to the text string through the following sequence:

oDrawingDoc.Sheets.Item(1).SketchedSymbols.Item(CountIndex1).Definition.Sketch.TextBoxes.Item(6).Text

In Inventor 2008 this sequence gives the label of the prompted entry and I can find no way to read the entered text. Any ideas?
0 Likes
361 Views
2 Replies
Replies (2)
Message 2 of 3

Anonymous
Not applicable
This is the result of a defect fix.
SketchSymbolDefinition.Sketch.TextBoxes.Item(6).Text was always meant to
return the prompted text, but was incorrectly returning the field text. The
obvious problem with the previous incorrect behavior is that if there are
multiple instances of the symbol based on this definition, which field text
would SketchSymbolDefinition.Sketch.TextBoxes(1) return?

In order to access and set the field text, use SketchedSymbol.GetResultText
and SketchedSymbol.SetPromptResultText respectively.

Sanjay-

wrote in message news:5623933@discussion.autodesk.com...
In Inventor 11 and previous, I wrote a macro that read existing values from
prompted text fields in sketched symbols. I was able to get to the text
string through the following sequence:

oDrawingDoc.Sheets.Item(1).SketchedSymbols.Item(CountIndex1).Definition.Sketch.TextBoxes.Item(6).Text

In Inventor 2008 this sequence gives the label of the prompted entry and I
can find no way to read the entered text. Any ideas?
0 Likes
Message 3 of 3

Anonymous
Not applicable
Thanks for your quick reply, Sanjay, it works great.
0 Likes