Skip to main content
16-Pearl
July 22, 2015
Solved

disable "auto check in"

  • July 22, 2015
  • 2 replies
  • 3312 views

Hi there,

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

Thanks

Matthias

    Best answer by Chris3

    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.

    2 replies

    Chris321-Topaz IAnswer
    21-Topaz I
    July 22, 2015

    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.

    14-Alexandrite
    March 31, 2016

    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

    Mat16-PearlAuthor
    16-Pearl
    March 31, 2016

    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?

    14-Alexandrite
    March 31, 2016

    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.