[CONNECT C++] Looking for native C++ API to update a parametric cell definition

In the image below I have placed a red arrow pointing to the Update From Library button on the Cell Library dialog.

I am looking for a native C++ API to do the same thing programatically

I have installed:

MicroStation CONNECT Edition         10.15.0.74

MicroStation CONNECT Edition SDK 10.15.00.076

Parents
  • Hi,

    This doesnt call a single api function, it executes a keyin:

    WString keyin;
    keyin.Sprintf(L"update parametriccell %ls", cellInfoP->cellName);
    mdlInput_sendKeyinExtended(keyin.c_str(), 0, INPUTQ_EOQ, NULL, FROM_MDL, false, true);

    Regards

    Paul



  • mdlInput_sendKeyinExtended(keyin.c_str(), 0, INPUTQ_EOQ, NULL, FROM_MDL, false, true);

    The published MicroStationAPI includes mdlInput_sendKeyin but not mdlInput_sendKeyinExtended.

    What does mdlInput_sendKeyinExtended do that you don't want us to know about?

     
    Regards, Jon Summers
    LA Solutions

  • The published MicroStationAPI includes mdlInput_sendKeyin but not mdlInput_sendKeyinExtended.

    Hi ,

    Let's briefly side-track and ask ourselves... How many ways can we place a line in MicroStation?  Both you and I in this thought experiment are literally thinking of "dozens" of ways we could accomplish this simple/single task. Yes there may be a most preferred/best but likely all are sufficiently good at handling that simple task.

    How many ways can we send a key-in in MicroStation? I don't want to bore or waste your time, but that changed too over a number of major releases of MicroStation and at an API level has had to provide several updates that fit "targeted needs"; like:

    • Send a key-in with little fanfare? mdlInput_sendKeyin (wcKeyin, bLiteral, msIQPosition, wcTaskIDorNULL)
    • But what about sending a sequential "synchronized" keyin? mdlInput_sendSynchronizedKeyin (wcKeyin, bLiteral, msIQPosition, wcTaskIDorNULL)
    • But what if we want our key-in to be "journaled" by macro recorder and undo/redo systems? mdlInput_sendKeyinJournaled (wcKeyin, bLiteral, msIQPosition, wcTaskIDorNULL)
    • What if we need to have our key-in act like it came "from" some specific location? mdlInput_sendKeyinFrom (wcKeyin, bLiteral, msIQPosition, wcTaskIDorNULL, intSourceOfKeyin)
    • Maybe more cases, but I'll stop here... Slight smile

    Given the above the internal/unpublished mdlInput_sendKeyinExtended offers those variants above, but by calling a single method with a couple more required arguments that provide e.g. "from" and "journalKeyin" options typically not all that often required/used - yet - still publicly available as previously mentioned.  And one last consideration is most of those functions could simply be replaced by creating your own custom input queue element, but then the API methods are there for convenience and protection.

    HTH,
    Bob



Reply
  • The published MicroStationAPI includes mdlInput_sendKeyin but not mdlInput_sendKeyinExtended.

    Hi ,

    Let's briefly side-track and ask ourselves... How many ways can we place a line in MicroStation?  Both you and I in this thought experiment are literally thinking of "dozens" of ways we could accomplish this simple/single task. Yes there may be a most preferred/best but likely all are sufficiently good at handling that simple task.

    How many ways can we send a key-in in MicroStation? I don't want to bore or waste your time, but that changed too over a number of major releases of MicroStation and at an API level has had to provide several updates that fit "targeted needs"; like:

    • Send a key-in with little fanfare? mdlInput_sendKeyin (wcKeyin, bLiteral, msIQPosition, wcTaskIDorNULL)
    • But what about sending a sequential "synchronized" keyin? mdlInput_sendSynchronizedKeyin (wcKeyin, bLiteral, msIQPosition, wcTaskIDorNULL)
    • But what if we want our key-in to be "journaled" by macro recorder and undo/redo systems? mdlInput_sendKeyinJournaled (wcKeyin, bLiteral, msIQPosition, wcTaskIDorNULL)
    • What if we need to have our key-in act like it came "from" some specific location? mdlInput_sendKeyinFrom (wcKeyin, bLiteral, msIQPosition, wcTaskIDorNULL, intSourceOfKeyin)
    • Maybe more cases, but I'll stop here... Slight smile

    Given the above the internal/unpublished mdlInput_sendKeyinExtended offers those variants above, but by calling a single method with a couple more required arguments that provide e.g. "from" and "journalKeyin" options typically not all that often required/used - yet - still publicly available as previously mentioned.  And one last consideration is most of those functions could simply be replaced by creating your own custom input queue element, but then the API methods are there for convenience and protection.

    HTH,
    Bob



Children
  • Hey Robert,

    Please see my later response to Jon on this discussion.  If possible I'd prefer to not execute the key-in because this displays a confirmation message box.  Since I am looping over all the cached parametric cell definitions, pressing OK on every one of them is pretty tedious.  Instead I'd like to write a function that loops over each of these and silently performs the update.  Unfortunately I haven't been able to figure that out using the SDK.

    Do you have any suggestions for what functions I need to call to get this done?

    Thanks,

    John M.