Obsolete method warning for innovator 11.0 SP9

オフライン

Am using a C# Method which is used to fetch the related parts of a CAD. On Syntax check i get an Obsolete method warning as shown below,

Line number 332, Warning Number: CS0618, 'Aras.Server.Core.ICachePublicAPI.GetItemTypeFromCache(ref string, ref string)' is obsolete: 'Obsolete starting from 9.3. Do not use in server core.'

But this method was working fine before.

Due to this warning the method is not working as expected. Am very new to PLM Aaras programming. I couldn't understand what is happening and how to resolve. Is there any method to replace the Obselete method or how? Any quick response would be more appreciated. 

Thanks,

Bala.

Parents
  • Hi Bala

    Try using Utils.CCO.Cache.GetItemTypeFromCache(ref string, ref string) and let me know if it works

  • 0 オフライン in reply to Gopikrishnan

    Hi Gopi

    Thanks for your quick response.

    Actually the error is thrown when I put a break point in the method and check for syntax. Else there is no such warning and the method executes without throwing any errors.

    And I pass string only. please ref the image below,

    Thanks.

  • Hi sbala,

    I tried looking for these snippets of code in a local database and found it was used in some standard methods like PE_GetRelatedParts. In general, the Utils and CCO classes are not needed and are typically only used by experienced Aras developers. Where possible, it's also best not modify standard methods like these as making changes to them can have unintended results.

    Could you clarify what you're use case is? There might be a better alternative approach you could take instead of modifying this method.

    Chris


    Christopher Gillis

    Aras Labs Software Engineer

  • Hi Christopher,

    Thanks for your reply!!

    The actual issue was in PLM some of the parts were not displayed as shown below,

    Those parts were created using the cad connector. To troubleshoot this issue i thought to put a break point code in the method PE_GetRelatedParts. 

    That resulted in error. My actual requirement is to check the root cause of parts not displayed in one of the CAD item in plm. This is happening only for one user account. I tried with admin/. supper account and my account as well. It is working perfectly as expected. I can able to view the parts for that CAD item. So i couldn't find a way to approach this issue to resolve. 

    How do i approach this issue?

    Thanks.

Reply
  • Hi Christopher,

    Thanks for your reply!!

    The actual issue was in PLM some of the parts were not displayed as shown below,

    Those parts were created using the cad connector. To troubleshoot this issue i thought to put a break point code in the method PE_GetRelatedParts. 

    That resulted in error. My actual requirement is to check the root cause of parts not displayed in one of the CAD item in plm. This is happening only for one user account. I tried with admin/. supper account and my account as well. It is working perfectly as expected. I can able to view the parts for that CAD item. So i couldn't find a way to approach this issue to resolve. 

    How do i approach this issue?

    Thanks.

Children