cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
Showing results for 
Search instead for 
Did you mean: 

Community Tip - Did you get called away in the middle of writing a post? Don't worry you can find your unfinished post later in the Drafts section of your profile page. X

Data utility to force name to uppercase

SimonLucas
1-Newbie

Data utility to force name to uppercase

Hi,

we would like to enforce all names being uppercase, both on creation and during rename.

Had the idea of creating a custom data utility to drive this which could be fired on a rename. Is it also possible to reference a data utility in an OIR or would we need to check for check in and fire the utility then?

Cheers

5 REPLIES 5
LoriSood
22-Sapphire II
(To:SimonLucas)

What about putting an Uppercase constraint on the attribute?

5-21-2015 5-08-11 PM.png

The constraint types are mentioned here:

http://www.ptc.com/cs/help/windchill_hc/wc101_hc/index.jspx?id=TypeMgrAttrConstraintRuleRef&action=show

HI,

that will fix the uppercase part, but also now looking at doing some sanity checking such as replacing underscores with spaces and possible some escape characters so that you can force certain characters to lower case such as when specifying a bolt size eg M10x35.

Currently looking into either using a validator or a listener as also need to be able to check on rename.

LoriSood
22-Sapphire II
(To:SimonLucas)

I think a validator could be used here. The following article provides an example of how to check name and number in the rename wizard. You should be able to modify this to suit your purposes:

https://support.ptc.com/appserver/cs/view/solution.jsp?n=CS119050

Does anyone know why this solution does not apply to CAD Documents?

IMPORTANT NOTE: This does not apply to the CAD Documents (EPMDocument) rename action

LoriSood
22-Sapphire II
(To:MarkBohannon)

Mark,

A different wizard/set of code is used to rename CAD Documents, which is why the code in the article will not work for that type.

The supported approach for CAD Documents is to use a listener. See https://support.ptc.com/appserver/cs/view/solution.jsp?n=CS121491.

Top Tags