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

We are happy to announce the new Windchill Customization board! Learn more.

Can't get the value of my attributes

VINO
3-Visitor

Can't get the value of my attributes

I'm trying to get the values of my custom attributes of a part.But it gives the result as zero.

I have used the following code.Someone help me out

public static void getIBA_WTP_Attr(WTPart wtp){

try{

System.out.println("Inside avi test");

//Locale locale = Locale.getDefault();

wt.iba.value.IBAHolder ibaHolder=wt.iba.value.service.IBAValueHelper.service.refreshAttributeContainer((wt.iba.value.IBAHolder)wtp, null, null, null);

//wt.iba.definition.service.StandardIBADefinitionService defService=new wt.iba.definition.service.StandardIBADefinitionService();

wt.iba.value.DefaultAttributeContainer attributeContainer=(wt.iba.value.DefaultAttributeContainer)ibaHolder.getAttributeContainer();

AbstractValueView[] abc= attributeContainer.getAttributeValues();

AttributeDefDefaultView[] xyz= attributeContainer.getAttributeDefinitions();

System.out.println("length is "+abc.length);

for(int i=0;i<abc.length;i++)

{

System.out.println("1-"+abc[i].getLocalizedDisplayString());

System.out.println("2-"+xyz[i].getLocalizedDisplayString());

}

Thank you

0 REPLIES 0
Top Tags