Announcements
Attention for Customers without Multi-Factor Authentication or Single Sign-On - OTP Verification rolls out April 2025. Read all about it here.
Maxim-CADman77
448 Views, 1 Reply

Explanation or sample of using UnitsTypeEnum.kTextUnits

I feel curious to see any sample of using UnitsTypeEnum.kTextUnits.
I expect it to work by means of UnitsOfMeasure.GetTypeFromString Method but I failed to get it working (not sure to have used the correct string).

 

PS:
Till now I've found the only subject related thread that does not contain any trustworthy or helpful information (yet marked as "solved").

Please vote for Inventor-Idea Text Search within Option Names

You could use it like this:

Dim doc As PartDocument = ThisDoc.Document
Dim userParameters = doc.ComponentDefinition.Parameters.UserParameters
userParameters.AddByValue("MyStringParameter", "Parameter text", UnitsTypeEnum.kTextUnits)

 

As a bonus, I wrote a blog article "Parameter, Document and Database Units". In the article, I use the method "UnitsOfMeasure.GetTypeFromString(...)"

Jelte de Jong
Did you find this post helpful? Feel free to Like this post.
Did your question get successfully answered? Then click on the ACCEPT SOLUTION button.

EESignature


Blog: hjalte.nl - github.com