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

Community Tip - Learn all about the Community Ranking System, a fun gamification element of the PTC Community. X

Toolkit: ProDtlattachArrowtypeSet how to use to change the style of the arrow?

ysinitsin
1-Newbie

Toolkit: ProDtlattachArrowtypeSet how to use to change the style of the arrow?

Hello!


Anybody had success to use ProDtlattachArrowtypeSet or ProDtlattachArrowtypeGet?


My code:


ProDtlattach leader;

ProSelection sel = *(ProSelection *)Weld_data_global.edges_sel[l];

err = ProSelectionVerify(Weld_data_global.edges_sel[l]);

err = ProDtlattachAlloc(PRO_DTLATTACHTYPE_PARAMETRIC, NULL, NULL, Weld_data_global.edges_sel[l], &leader);

/* Licensing Requirement Pro/TOOLKIT-for-3D_Drawings (222)*/

PRO_TK_BAD_INPUTS

err = ProDtlattachArrowtypeGet(leader, &leadertype);

err = ProArrayObjectAdd ((ProArray*)&leaders, -1, 1, &leader);

3 REPLIES 3

The solution:


Need to create note, then collect a leaders from new note, set new arrow type and modify the note.

err = ProDtlnoteCreate(*drawing, NULL, ndata, ¬e);
ERROR_CHECK( err );

err = ProNoteLeaderstyleSet(¬e, PRO_LEADER_ISO);

/*--------------------------------------------------------------------*\
Display the note
\*--------------------------------------------------------------------*/
err = ProDtlnoteShow(¬e);
ERROR_CHECK( err );

/*--------------------------------------------------------------------*\
Free the memory for the note description
\*--------------------------------------------------------------------*/
ProDtlnotedataFree(ndata);

err = ProDtlnoteDataGet(¬e, NULL, PRODISPMODE_NUMERIC, &ndata);

err = ProDtlnotedataLeadersCollect(ndata, &leaders);

err = ProDtlattachArrowtypeSet(leaders[0], PROLEADERTYPE_RIGHTHALF);

err = ProDtlnotedataLeadersSet(ndata, leaders);

err= ProDtlnoteModify(¬e, NULL, ndata);

qzhao
3-Visitor
(To:ysinitsin)

ProNoteLeaderstyleSet  : this method need license!!!
qzhao
3-Visitor
(To:ysinitsin)

ProNoteLeaderstyleSet : this metod need License!!!
Top Tags