Skip to main content
1-Visitor
April 8, 2025
Question

対象のWTDocumentから特定のIBA属性を取得する方法を教えてください。

  • April 8, 2025
  • 4 replies
  • 747 views
I am using Windchill PDMLink Release 12.1 and Datecode with CPS 12.1.0.3

カスタマイズ機能を開発しています。
対象のWTDocumentから特定のIBA属性を取得する方法を教えてください。

4 replies

Catalina
Community Moderator
April 8, 2025

Hi @SY_11011881 

 

Thank you for your question! 

 

I’d like to recommend to bring more details and context to your initial inquiry. For example:

  • Can you describe the steps you have taken so far to retrieve the IBA attribute from the WTDocument using Windchill PDMLink 12.1?
  • Are you encountering any specific error messages or issues when trying to fetch the IBA attribute?
  • Have you checked the configuration and setup of your Windchill environment to ensure it supports the API functions you are trying to use?

Please add screenshot(s) to better understand what you are trying to do in your process. 

 

Please refer to this guideline to make your questions more likely to receive a quick and useful answer. 

This will increase your chances to receive meaningful help from other Community members. 

 

What is a good question? 

Windchill 

 

Thank you for your participation and please let me know if you need further assistance! 

 

Best regards,

Catalina | PTC Community Moderator
12-Amethyst
April 8, 2025

a portion of your text s not visible in english language. can you also put the question in english ?

Catalina
Community Moderator
April 9, 2025

Hi @aman.somgade,

 

Please make sure to use the translation option we have available. It will translate the whole text, and title, in English.

Catalina_0-1744181376020.png

 

Thanks,

 

Catalina | PTC Community Moderator
12-Amethyst
April 9, 2025

Thanks for the info. I will use this feature going ahead.

12-Amethyst
April 9, 2025

You can use this code to get the attribute value:

 

public static String getIBAValue(Persistable targetObj, String ibaInternalName) throws WTException {

String ibaValue = "";

try {

Locale locale = SessionHelper.getLocale();

PersistableAdapter obj = new PersistableAdapter(targetObj, null, locale, null);

obj.load(ibaInternalName);

Object ibaObj = obj.get(ibaInternalName);

if(ibaObj != null)

{

return ibaObj.toString();

}

else

return ibaValue;

} catch (WTException e) {

e.printStackTrace();

String error = "Error while fetching attribute value with message= "+e.getMessage();

return error;

}

 

}

Catalina
Community Moderator
April 15, 2025

Hi @SY_11011881,

I wanted to see if you got the help you needed.

If so, please mark the appropriate reply as the Accepted Solution or please feel free to detail in a reply what has helped you and mark it as the Accepted Solution. It will help other members who may have the same question.
Please note that industry experts also review the replies and may eventually accept one of them as solution on your behalf.

Of course, if you have more to share on your issue, please pursue the conversation.

Thanks,

Catalina | PTC Community Moderator