Skip to main content
13-Aquamarine
July 8, 2022
Question

Webject to retrieve custom attribute with name Class

  • July 8, 2022
  • 1 reply
  • 946 views

Hi, 

We have a use-case where we have added some custom attributes in Windchill. 

We retrieve the values against these attributes using Query-Objects webject , like so 

 

<ie:webject name="Query-Objects" type="OBJ">
<ie:param name="instance" data="${@FORM[]supporting-adapter[*]}"
valueSeparator=";" delim=";"/>
<ie:param name="attribute" data="name,Class" delim=","/>
<ie:param name="group_out" data="objects"/>
</ie:webject>

 

This works fine with almost all attributes, however, if the attribute Name is "Class", it returns the class-type of the object and not the actual value. 

e.g.

TestPart

         Class: "ABC"

 

Returned Value:  WCTYPE|wt.part.WTPart|local.eQVM.TestPart

Expected Value: ABC

 

Is there a way we can mask/escape class attribute Name to get expected Data?

 

1 reply

18-Opal
July 13, 2022

@ashishbhusa 

I believe the short answer is no on escape.

The thing is escape characters are used when programming and that not what is going on here.

 

You can get the information other ways programmatically using the Windchill APIs but using a webject I don’t think will get you there.

 

Seems like you may have found a bug. Windchill probably should not have allowed you to use the internal name “Class” for your attribute.

 

 BTW, you could go into the dB and change the internal name from “Class” to something else.

 

David