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

Loading Attributes via XML load file

ptc-4643452
1-Newbie

Loading Attributes via XML load file

I'm loading attributes into Windchill using the batch load functionality. Generally, things work okay but I"m looking for a way to include a default value for attributes. For example, how can I specify a Dash "-" as the default for an attribute.

Thanks in advance.

2 REPLIES 2

Hi Mark,

Attribute defaults are an interesting subject. It appears only MBA (modelled) attributes truly have a hard default value which is assigned at the persistence level. For an IBA and SDA the idea of a default becomes far more difficult.

Type Management (Type manager UI in Site>Utilities)

The type manager allows you to specify a default for an attribute BUT the assignment of this default has to be implemented by the client that is managing the Windchill object. So the Wizard (JCA/JSP), UWGM (Creo/Editor) or InfoEngine frameworks are all required to make sense of this default value and assign it when required (typically on creation).

Object Initialization Rule (see customisers guide)

Another option that works quite well is to use the OIR mechanism which allows a default to be used on creation. The JCA framework even pre-initialises the value, for example the 'default folder path' onto the wizard to show the user the default folder path in the OIR.

The OIR is probably the most customisable and reliable way of assigning a default before creation.

Hope this helps,

-Ste

p.s. If you want to get very fancy you could create an OIR algorithm which reads the attributes default value in the type manager.

We set default values for a few of our IBAs in the type definitions, not in the IBA definitions. This causes the default value to show up in the input field for that attribute on the Create wizard for the type.

<csvTypeDefAttrValue handler="com.ptc.core.meta.type.mgmt.server.impl.TypeDefinitionNodeLoader.createAttributeValue" >

<csvdefinition>myIBA</csvdefinition>

<csvvalue1>ABC</csvvalue1>

</csvTypeDefAttrValue>

This only works where you use the attribute, so if you use the same IBA attribute on 5 different soft types, you have to include this on EACH usage. We've also used this to specify the default value when applying a DiscreteSetConstraint against the attribute. Again, on the usage, not the IBA definition.

Top Tags