Article - CS345696

VB API application crashes with System.AccessViolationException exception.

Modified: 27-Jul-2021   


Applies To

  • Creo Parametric 4.0 to 8.0

Description

  • VB API application crashes when calling CMpfcSelect.CreateModelItemSelection() to create an IpfcSelection object of a surface.
    • After upgrading Creo Parametric 4.0 from M040 to M110, VB API application doesn't crash but will throw error:
Specified cast is not valid.
  • Error System.AccessViolationException can be found in the corresponding Error item in Windows Computer Mangement > System Tools > Event Viewer > Windows Logs > Application.
  • Getting System.AccessViolationException when using a VB API application, which works with Creo Parametric 4.0, with Creo Parametric 7.0.
This is a printer-friendly version of Article 345696 and may be out of date. For the latest version click CS345696