GetMaximumWidthLimit error when creating new TextNotes

GetMaximumWidthLimit error when creating new TextNotes

a-carpentier
Advocate Advocate
475 Views
2 Replies
Message 1 of 3

GetMaximumWidthLimit error when creating new TextNotes

a-carpentier
Advocate
Advocate

HI everyone,

 

When trying to programmatically add text notes with set width on my views, I sometimes get an error message stating:

 

The given width is not valid. A valid value must be within the range returned by static methods 
GetMinimumWidthLimit and GetMaximumWidthLimit.

 

However I can't find any information about those two static methods.
So what width range is valid for a TextNote?

0 Likes
Accepted solutions (1)
476 Views
2 Replies
Replies (2)
Message 2 of 3

RPTHOMAS108
Mentor
Mentor
Accepted solution

TextElement.GetMaximumAllowedWidth Method (Document, ElementId)

TextElement.GetMinimumAllowedWidth Method (Document, ElementId)

 

Inherited by TextNote

 

Code example given in RevitAPI.chm under:

TextNote.Create Method (Document, ElementId, XYZ, Double, String, TextNoteOptions)

 

Message 3 of 3

a-carpentier
Advocate
Advocate

Thanks! I was searching for "GetMaximumWidthLimit" as specified in the error message and was not finding anything.

I think the error message should be modified to reflect the correct method names.

0 Likes