Skip to main content
16-Pearl
Jul 22, 2015 9:43 AM UTC
Solved

disable "auto check in"

Hi there,

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

Thanks

Matthias

    Chris3
    Chris3Answer
    21-Topaz I
    Jul 22, 2015 11:42 AM UTC

    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.

    4 replies

    Chris3
    Chris321-Topaz IAnswer
    21-Topaz I
    Jul 22, 2015 11:42 AM UTC

    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.

    Translate
    14-Alexandrite
    Mar 31, 2016 6:24 AM UTC

    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

    Translate
    Mat16-PearlAuthor
    16-Pearl
    Mar 31, 2016 8:12 AM UTC

    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?

    Translate
    14-Alexandrite
    Mar 31, 2016 9:11 PM UTC

    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.

    Translate