cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
Showing results for 
Search instead for 
Did you mean: 

Community Tip - New to the community? Learn how to post a question and get help from PTC and industry experts! X

Translate the entire conversation x

ProMdlReadonlyIgnore implementation

BK_8649137
6-Contributor

ProMdlReadonlyIgnore implementation

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.

ACCEPTED SOLUTION

Accepted Solutions
syalagudri
14-Alexandrite
(To:BK_8649137)

Its a hidden API and available in ProMdl.h. i think you should be using 10.0.2.0 and above build for this 

syalagudri_0-1728543813631.png

 

View solution in original post

13 REPLIES 13
syalagudri
14-Alexandrite
(To:BK_8649137)

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);
BK_8649137
6-Contributor
(To:syalagudri)

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.

syalagudri
14-Alexandrite
(To:BK_8649137)

Its a hidden API and available in ProMdl.h. i think you should be using 10.0.2.0 and above build for this 

syalagudri_0-1728543813631.png

 

syalagudri
14-Alexandrite
(To:syalagudri)

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

*/

 

BK_8649137
6-Contributor
(To:syalagudri)

I check in ProMdl.h, its unavailable..I am using 10.0.5..Is it possible to have missed it?

syalagudri
14-Alexandrite
(To:BK_8649137)

Add this and try. This is how you should use hidden API.

RPN
17-Peridot
17-Peridot
(To:syalagudri)

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. 

msteffke
14-Alexandrite
(To:RPN)

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?

 

RPN
17-Peridot
17-Peridot
(To:msteffke)

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. 

msteffke
14-Alexandrite
(To:RPN)

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.      

msteffke
14-Alexandrite
(To:syalagudri)

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!

syalagudri
14-Alexandrite
(To:msteffke)

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.

RPN
17-Peridot
17-Peridot
(To:BK_8649137)

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!

 

Announcements


Top Tags