Community Tip - You can change your system assigned username to something more personal in your community settings. X
Hi,
I am trying to implement ProMdlReadonlyIgnore with reference to article CS398373, as I am unable to upload parameters while it is in Checkin state. Untill Creo 7.0.11 I was able to do it, but same action in Creo 10.0.5 is demanding me a checkout. By referring article CS398373 I figured we have to use ProMdlReadonlyIgnore(I suppose not as a custom API) but PTC provided. I do not see any document in Creo Parametric TOOLKIT API Wizard .Can I get some help here.
Solved! Go to Solution.
Its a hidden API and available in ProMdl.h. i think you should be using 10.0.2.0 and above build for this
We faced the similar issue. After using API ProMdlReadonlyIgnore its allowed to update the parameter. May be you can set to true at the start of toolkit execution and set to false once toolkit execution completes. Need to set false on any exception also.
ProMdlReadonlyIgnore(PRO_B_TRUE);
I tried it, but I am not able to find which header file to include to get this function/files/toolkit/includes to work?Also to be specific, when I use
ProMdlReadonlyIgnore(PRO_B_TRUE);
I am getting - identifier "ProMdlReadonlyIgnore" is undentified error.
Its a hidden API and available in ProMdl.h. i think you should be using 10.0.2.0 and above build for this
If you don't find it then add this at the end of header file
extern ProError ProMdlReadonlyIgnore (ProBoolean set_value);
/*
Purpose: To allow ignoring the readonly state of the model for affected API operations.
Input Arguments:
set_value - PRO_B_TRUE ignore readonly state, PRO_B_FALSE to not ignore readonly state.
Output Arguments:
none
Return Values:
PRO_TK_NO_ERROR - The function succeeded
PRO_TK_GENERAL_ERROR - The function failed
*/
I check in ProMdl.h, its unavailable..I am using 10.0.5..Is it possible to have missed it?
Add this and try. This is how you should use hidden API.
For me it’s just a sticky session flag, if you call this you should revert this as well. It is just a dirty work around given by PTC.
Sticky session flag. What does that mean. If you call it in one program, the entire creo session has ths behavior until you you turn it off, or shut Creo down?
If I remember correctly, it works like a config option. For sure you need to call this before any changes, if not the user will get a dialog and you have to handle more effectively return codes.
Thanks RPN, I added the declaration to the .h file, and my programs are now able to modify parameters in non checked out items. So this is a life saver. PTC needs to understand that modifying a non checked out item is harmless if you are not saving. We are flexing configurable parts to custom sizes (no limitations) and exporting the results as MFG type files. What we've been doing in Creo / Proe since the 90's.
This -48 issue has had a devastating effect on us the last few months. When do you call this function? The user_initialize? does the setting last while your app is running? or does it set a flag for your entire creo session. does it work across other programs that are running? Do you have any implimentation details? Thanks!
Its a temporary solution in Creo10. Not sure what PTC will take action in Creo 12. PTC might say wont support anymore. So this will be a problem in future release also.
Ive had a call open with PTC, and was told there was a going to be a some type of resolution in Creo 12. However I have installed Creo 12, and redid my apps in VS2022 and the probem was the same, parameters would not update. I reopened that call. I did apply ProMdlReadonlyIgnore function in Creo 12 and this work-around still works. I am awaiting some followup with PTC on the matter.
CS44835
Set config
dm_auto_conflict_resolution yes
dm_checkout_on_the_fly continue
I would read and save with toolkit, on quit the app restore the saved value!
CS398373: Note this is a hidden API, you may need to add this to one header file and include this!