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.

  • Hi Bala

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

  • 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.

  • Hi sbala,

    This sounds like a permissions issue that can be checked and fixed outside of any code. If you go to the CAD item in question, you can look at the permissions of the item by selecting Views > Permissions > View. You can then check the identities on this permission to make sure that your user account has access to view this CAD item.

    Chris

  • Hi Christo,

    On that permission there are few identities groups added. the account that is facing issue is also added in one couple of identity groups. But still the account holder says that he couldn't view the parts in that CAD item.

    Wondering what could be the issue.

    Thanks.