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

Community Tip - If community subscription notifications are filling up your inbox you can set up a daily digest and get all your notifications in a single email. X

How to create Offset Planes using J-link

sindl.ecoml.sa
1-Newbie

How to create Offset Planes using J-link

Hi for all!

I need to create offset planes using the j-link.

Does anyone know how to do it?


Capturar.PNG


Thanks!

3 REPLIES 3

I don't think that this is possible with J-Link, but you can do it with TK / OTK this way (Just create it on std. system, but you can create it on other positions too) : --> (sry for no comments)

So if it's possible in J-Link it should work the same way, but with Java API wrapper.

void createADatumPane(int c_sys_pane_type, wchar_t * panename, ProFeature * feat) {

    ProElement pro_e_feature_tree, pro_e_feature_type, elem_const_type, elem_offset, pro_e_std_feature_name, elem_consts;

    ProErrorlist errs;

    ProError tkerr;

    ProValueData value_data;

    ProValue value;

    ProFeatureCreateOptions opts[1];

    ProName wide_string = L"";

    ProModelitem p_mdl_itm;

    ProSelection sel;

    wcscpy_s(wide_string, PRO_NAME_SIZE, panename);

    ProElementAlloc(PRO_E_FEATURE_TREE, &pro_e_feature_tree);

    ProElementAlloc(PRO_E_FEATURE_TYPE, &pro_e_feature_type);

    value_data.type = PRO_VALUE_TYPE_INT;

    value_data.v.i = PRO_FEAT_DATUM;

    ProValueAlloc(&value);

    ProValueDataSet ( value, &value_data );

    ProElementValueSet ( pro_e_feature_type, value );

    ProElemtreeElementAdd ( pro_e_feature_tree, NULL, pro_e_feature_type );

    ProElementAlloc ( PRO_E_STD_FEATURE_NAME, &pro_e_std_feature_name );

    value_data.type = PRO_VALUE_TYPE_WSTRING;

    value_data.v.w = wide_string;

    ProValueAlloc ( &value );

    ProValueDataSet ( value, &value_data );

    ProElementValueSet ( pro_e_std_feature_name, value );

    ProElemtreeElementAdd ( pro_e_feature_tree, NULL, pro_e_std_feature_name );

    ProElementAlloc (PRO_E_DTMPLN_CONSTRAINTS, &elem_consts);

    ProElemtreeElementAdd (pro_e_feature_tree, NULL, elem_consts);

  

    ProElementAlloc (PRO_E_DTMPLN_CONSTRAINT, &elem_offset);

    ProElemtreeElementAdd (elem_consts, NULL, elem_offset);

    ProElementAlloc (PRO_E_DTMPLN_CONSTR_TYPE, &elem_const_type);

    value_data.type = PRO_VALUE_TYPE_INT;

    value_data.v.i = c_sys_pane_type;

    ProValueAlloc (&value);

    ProValueDataSet (value, &value_data);

    ProElementValueSet (elem_const_type, value);

    ProElemtreeElementAdd (elem_offset, NULL, elem_const_type);

    opts[0] = PRO_FEAT_CR_DEFINE_MISS_ELEMS;

    ProMdlToModelitem(addFirstKEsFeatureVisitModel, &p_mdl_itm);

    ProSelectionAlloc(NULL, &p_mdl_itm, &sel);

    tkerr = ProFeatureCreate(sel, pro_e_feature_tree, opts, 1, feat, &errs);

    if (tkerr != PRO_TK_NO_ERROR) {

        writeRunnerLog(L"Can't create the datum pane.", 2);

    } else {

        setCost(1);

    }

    ProSelectionFree(&sel);

    ProElementFree(&pro_e_feature_tree);

}

createADatumPane(PRO_DTMPLN_DEF_Y, L"YayImNew_Y", &feat);

Best regards,

Eike

PS: Please close the question if this answer reaches your needs. So the topics overview get better. Thx

Thank Eike for the return, but the problem is that I don't have the TK / OTK, only J-Link.

There is an example in J-Link API that I'm unable to do, as the following image.


Capturar.PNG


Thanks!


Mat
13-Aquamarine
13-Aquamarine
(To:sindl.ecoml.sa)

I had a quite similar problem creating coordinate systems and datum planes with web-Link.

The best way to solve that, was to use UDFs.

Take a look here.

creating a coordinate system with weblink

Top Tags