Inventor 2008 LeaderNote.FormattedText

Inventor 2008 LeaderNote.FormattedText

Anonymous
Not applicable
514 Views
4 Replies
Message 1 of 5

Inventor 2008 LeaderNote.FormattedText

Anonymous
Not applicable
Hello to all,

I have a question about the public property FormattedText in the Inventor.LeaderNote object. I am wanting to include a named model parameter to a LeaderNote within a DrawingDocument. The API help document says that to insert an XML tag that i can not seem to get to work. Or to post on this message since it is XML.
When I set this to my LeaderNote object it will create the note but the text will be what is above. I searched the discussion groups and did find how to add FormatedText to a LeaderNote. Is this a bug with LeaderNotes or is my XML tag not legal for Inventor to read? Is there a way to include a model or user parameter in a LeaderNote programmatically in Inventor 2008?

Thank you in advance.
0 Likes
515 Views
4 Replies
Replies (4)
Message 2 of 5

Anonymous
Not applicable
Unfortunately, the implementation of this property is very sensitive to the
upper/lower cases of the XML tags. And I think that the help document has
some errors as well. Here is some code to help you with this. This should
append the value of a parameter "d0" from the model document
("C:\temp\block.ipt")

Sub FormatText()

Dim oDoc As Document
Set oDoc = ThisApplication.ActiveDocument

Dim oLeaderNote As LeaderNote
Set oLeaderNote = oDoc.SelectSet(1)

oLeaderNote.FormattedText = oLeaderNote.FormattedText & "
ComponentIdentifier='C:\temp\block.ipt' Name='d0'
Precision='2'>
"

End Sub

Sanjay-

wrote in message news:5627128@discussion.autodesk.com...
Hello to all,

I have a question about the public property FormattedText in the
Inventor.LeaderNote object. I am wanting to include a named model parameter
to a LeaderNote within a DrawingDocument. The API help document says that to
insert an XML tag that i can not seem to get to work. Or to post on this
message since it is XML.
When I set this to my LeaderNote object it will create the note but the text
will be what is above. I searched the discussion groups and did find how to
add FormatedText to a LeaderNote. Is this a bug with LeaderNotes or is my
XML tag not legal for Inventor to read? Is there a way to include a model or
user parameter in a LeaderNote programmatically in Inventor 2008?

Thank you in advance.
0 Likes
Message 3 of 5

Anonymous
Not applicable
Sanjay,

Thank you for the quick response. The XML tags are very case sensitive. I changed the p in parameter and the n in name to uppercase and removed the double quotation. Works great!

Thank you again Sanjay for your time,
Lucas
0 Likes
Message 4 of 5

Anonymous
Not applicable
I have another question about LeaderNote objects. After obtaining the parameters form the model onto the drawing I want to change the Unit Attribute to suppress the LeadingZeroDisplay. I have tried to use the DimensionStyle.LeaderingZeroDisplay set equal to false but it doesn't seem to work. The dialog box that appears when you RMB the LeaderNote says Edit Unit Attribute. Not sure if this is even possible yet for 2008 release.

Thank you in advance,
Lucas
0 Likes
Message 5 of 5

Anonymous
Not applicable
The 'Edit Unit Attributes' options are not currently available thru the API.

Sanjay-

wrote in message news:5628386@discussion.autodesk.com...
I have another question about LeaderNote objects. After obtaining the
parameters form the model onto the drawing I want to change the Unit
Attribute to suppress the LeadingZeroDisplay. I have tried to use the
DimensionStyle.LeaderingZeroDisplay set equal to false but it doesn't seem
to work. The dialog box that appears when you RMB the LeaderNote says Edit
Unit Attribute. Not sure if this is even possible yet for 2008 release.

Thank you in advance,
Lucas
0 Likes