about the PARAM_POSITION Dialog

Welcome to our brand new Clickteam Community Hub! We hope you will enjoy using the new features, which we will be further expanding in the coming months.

A few features including Passport are unavailable initially whilst we monitor stability of the new platform, we hope to bring these online very soon. Small issues will crop up following the import from our old system, including some message formatting, translation accuracy and other things.

Thank you for your patience whilst we've worked on this and we look forward to more exciting community developments soon!

Clickteam.
  • I am missing How to activate and get a layer number of in the PARAM_POSITION Dialog. (Especially to know how to activate the layer setting)

    Please login to see this attachment.

    Currently The positions data recived as a integer, if include the layer info in it, to use the user defined struct?

    paramExt* getxyl = (paramExt*)CNC_GetParameter(rdPtr);
    xylParam* xyl = (xylParam*)getxyl->pextData;// custom struct
    int xpos = HIWORD(xyl.layer);
    int ypos = LOWORD(xyl.layer);
    int layer = xyl.layer;

    have any info?

    MMF2 Dev(Jp and En),Unicode,SWF expoter,XNA

    Edited once, last by prester: forgot to include a pic file (September 26, 2022 at 9:20 AM).

  • Cast the long value you get to LPPOS.
    You can find the definition in cncf.h.
    Usually directly cast is enough, but for some cases (e.g., obstacle type) you need to get the value by cast param to eventParam struct and get the value in W or L, according to Yves's comment.

  • Edit: if your extension uses more than two params, then cast param1 or 2 is not enough, in this case you need to get the currentParam pointer.
    The macro provided to read params will update this pointer, so be careful to not mess the order.

    Code
    eventParam* param = rdPtr->rHo.hoCurrentParam;
    param = (eventParam*)((BYTE*)(param) + param->evpSize * index);
  • This is possible for absolute positions only. Before doing CNC_GetParameter, do this:

    LPPOS pPos = (LPPOS)&rdPtr->rHo.hoCurrentParam->evp.evpW.evpW0;

    This gives you access to the PositionParam structure. In this structure, posLayer gives you the layer, but only if it's an absolute position, = when posOINUMParent == -1.

    If posOINUMParent != -1, then you have to take the layer from the "parent" object. Finding what is the parent object depends on the current selection, this is complex and this function is not available to extensions.

  • Yves saying what If posOINUMParent == -1, But i'm not know about what the case of posOINUMParent will get the value -1.

    In most cases, from the Extensions, Not be able to access the pulldown menu of the layer when to use the PARAM_POSITION Dialog?

    MMF2 Dev(Jp and En),Unicode,SWF expoter,XNA

  • Yves saying what If posOINUMParent == -1, But i'm not know about what the case of posOINUMParent will get the value -1.

    When using actual instead of relative to…
    Actually you can get parent object’s pointer, but a bit complex: get oil offset by oi then access to this object’s objectInfoList, and you can get first selection & offset to next, then you can iterate it as a chained list. Also you need to handle the case the object you relative to is a qualifier, method is the same but first you need to use a qualifier to object list to get the object info list with this qualifier, and call the iterate function of single object.
    You can find an object selection helper class by Anders Riggelsen (Andos) on forum, which helps a lot for beginners. I wrote a custom version based on it with the help of uppernate here: Please login to see this link.
    Playing with selection is a inevitable part of fusion, enjoy :p

  • If not using Relative, is it possible to way to get the layer param from pulldown in the PARAM_POSITION Dialog?

    I found an exsample in Andos's opensource "Create By Name object".
    It was using PARAM_POSITION Dialog, but this extension get XY pos only from Dialog and to get a layer info from the another param.

    Please login to see this attachment.

    MMF2 Dev(Jp and En),Unicode,SWF expoter,XNA

  • Did you try what I said above?

    Before doing CNC_GetParameter, do this:

    LPPOS pPos = (LPPOS)&rdPtr->rHo.hoCurrentParam->evp.evpW.evpW0;

    If the user chose "Actual coordinates", then posOINUMParent = -1 and posLayer gives you the index of the layer selected in the drop down list.

    Code
    if (pPos->posOINUMParent == -1)
    {
        // Actual coordinates
       layer = pPos->posLayer;
    }
    else
    {
        // Relative to
        // This case is more complex to handle as it depends on object selection AND if you are in a condition, action or expression...
    }

    I suggest that if you want a layer information in all cases you forget PARAM_POSITION and use your own X, Y and Layer parameters.

    Edited once, last by Yves (September 27, 2022 at 7:30 AM).

  • Sry for delay.

    short WINAPI DLLExport ACT_TEST(LPRDATA rdPtr, long param1, long param2)// TEST Action
    {
    LPPOS pPos = (LPPOS)&rdPtr->rHo.hoCurrentParam->evp.evpW.evpW0;
    auto layer = 0;
    switch (pPos->posOINUMParent)
    {
    case(-1):
    layer = pPos->posLayer;
    __fallthrough;
    default:
    CHECK_VALUE_MESSBOXW(pPos->posOINUMParent, _T("pPos->posOINUMParent; = "), _T("TEST"));
    break;
    };
    return 0;
    };

    I am still low understanding level.
    I've tried this code but anything no reaction from ACT_TEST function, then i noticed the target object's "Create at start" checkbox is off.

    If the Checkbox is on, returns number 1|2|3.. etcs, but not found case of -1.

    defisym's explanation exactly bit complex and still i can't understand (I thanks for defisym >> will learn from you and andos's source codes).

    I suggest that if you want a layer information in all cases you forget PARAM_POSITION and use your own X, Y and Layer parameters.

    Unfortunately, The only solutions i can do now, Yes, i will forget to get from the PARAM_POSITION.
    (or make a custom Dialog window.)

    Thank a lot!

    MMF2 Dev(Jp and En),Unicode,SWF expoter,XNA

Participate now!

Don’t have an account yet? Register yourself now and be a part of our community!