Community Tip - You can change your system assigned username to something more personal in your community settings. X
Hi,
I am using ProE toolkit for the first time and used ProMdlRetrieve to load model from the assembly file:
char* asm_name;
ProName name_wchar;
ProMdl *loaded_model = NULL;
asm_name = "015-0315.asm";
ProStringToWstring (name_wchar, asm_name);
err = ProMdlRetrieve (name_wchar, PRO_MDL_ASSEMBLY, loaded_model);
Running creo2 as it may be required for the function ProMdlRetrieve to get the definition from, assembly and parts are in the same folder.
I am getting an Access Violation error when control comes to the function ProMdlRetrieve.
what are the required settings for VS2012 to use ProE toolkit.
Please answer asap...
-Brijesh
Brijesh,
You need something like this:
char asm_name[PRO_NAME_SIZE]= "015-0315.asm";;
ProName name_wchar ={'\0'};
ProMdl loaded_model = NULL;
ProError err = PRO_TK_GENERAL_ERROR;
ProStringToWstring (name_wchar, asm_name);
err = ProMdlRetrieve (name_wchar, PRO_MDL_ASSEMBLY, &loaded_model);
or to shorten up :
ProName name_wchar = L"015-0315.asm";
ProMdl loaded_model = NULL;
ProError err = PRO_TK_GENERAL_ERROR;
err = ProMdlRetrieve (name_wchar, PRO_MDL_ASSEMBLY, &loaded_model);
HIH.
Feliks.
Hi Feliks,
Thanks for replying..
Your answer is helpful but I think I am not able to get the access of the function ProMdlRetrieve.
Getting the same error:
Unhandled exception at 0x000000013FD3BED7 in MFCApplication2.exe: 0xC0000005: Access violation reading location 0x0000000000000008.
I am testing my application by running the Parametric.exe in the background.
Do I need to run this Parametric.exe through the application code?
--------OR-----------
I there some more settings required for the MFC project?
-Brijesh
Brijesh,
To test ProMdlRetrieve functionality you could add four lines of code to the make_install or make_install_cxx application supplied with Pro/Toolkit.
Try to post your question to Customization Community and maybe someone with the MFC experience could help you.
Feliks.