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

Community Tip - Need to share some code when posting a question or reply? Make sure to use the "Insert code sample" menu option. Learn more! X

disable "auto check in"

Mat
13-Aquamarine
13-Aquamarine

disable "auto check in"

Hi there,

is there a way to disable "auto check in" - button in Creo 3.0 ?

Thanks

Matthias

1 ACCEPTED SOLUTION

Accepted Solutions
Chris3
20-Turquoise
(To:Mat)

I would encourage others to chime in if they know of a way, but I opened up a call with PTC several months ago and was told that the file menu could not be customized.

View solution in original post

4 REPLIES 4
Chris3
20-Turquoise
(To:Mat)

I would encourage others to chime in if they know of a way, but I opened up a call with PTC several months ago and was told that the file menu could not be customized.

sully7
13-Aquamarine
(To:Mat)

I dont remember off the top of my head.. but if an "auto-check in" has its own ProCmd (as opposed to a "custom check in"), you may be able to cancel the function using the ProCmdBracketFuncAdd()...

First, you would need to get the name of the PTC standard function. So, do an auto-checkin on any model, then go to your trail file to see if you can find a line that looks something like this:

~Command '<PTC_COMMAND>'

You could then try something to the effect of the following:

int uiCmdBracket_autoCheckin(uiCmdCmdId command, uiCmdValue *p_new_value, int entering_command, void **app_data) {

    return 0; // don't let the function be run. (you could pop up a message here to say something to the effect of "this has been disabled by your administrators")

}

int user_initialize() {

    ProError err = PRO_TK_NO_ERROR;

    /* .... some code ... */

    uiCmdCmdId cmd_id;

    err = ProCmdCmdIdFind("PTC_COMMAND", &cmd_id);

    err = ProCmdBracketFuncAdd(cmd_id, uiCmdBracket_autoCheckin, "uiCmdBracket_autoCheckin", NULL);

    /*... some other code ... */

}

The same pseudo-code should work in the OTK C++ API as well. Again, its dependent though on if the "auto-checkin" has its own unique command.

Hope this helps,

James

President & Founder
CadActive Technologies - www.cadactive.com
Mat
13-Aquamarine
13-Aquamarine
(To:sully7)

Just checked.

Indeed there is a

~ Command `ProCmdMdlTreeWfChkInExp`

in trail.txt.

Unfortunately, I do know how to run Your code to control Creo. Is it JAVA?

sully7
13-Aquamarine
(To:Mat)

No, that's pseudo-code for the normal "C" Toolkit API. There is a C++ "OTK" API, and one for Java as well that have similar capabilities, but those are object-oriented, and the functions will change slightly. There are several ways to do it, but In my personal case, I compile my C code into a DLL, and then integrate that directly into my Creo session.

In either of these three cases, you would need a license for Toolkit, and then would need to develop/compile the code, and integrate it into your Creo session. There are some how-to's around this forum, and maybe one or two floating around the internet somewhere.

President & Founder
CadActive Technologies - www.cadactive.com
Top Tags