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

Community Tip - Did you get an answer that solved your problem? Please mark it as an Accepted Solution so others with the same problem can find the answer easily. X

ProSelectionDimWitnessLineGet - relocate the dimension attachement point

VG_10822960
1-Visitor

ProSelectionDimWitnessLineGet - relocate the dimension attachement point

I am using Creo Parametric Release 4.0 and DatecodeM140

H team, i want to relocate the dimension attachement point. i used this ProSelectionDimWitnessLineGet but its not working. kindly help me to over come this issue. thank you

2 REPLIES 2

Hello @VG_10822960

 

Thank you for your question. 
Your question appears to be well documented, however I'd like to recommend to bring more details and context to your initial inquiry. 

It also helps to have screenshot(s) to better understand what you are trying to do in your process. 

This will increase your chances to receive meaningful help from other Community members. 

Regards,
Community Moderation Team.

Hi Team,

Regarding the issue we are facing for dimension witness line attaching point movement.

We are providing below code snippet which we used to move the dimension witness line attachment point to the provided location.

But the below code is not giving any error while executing, and the witness line attachment point also not moving to input location.

Please suggest us why this code is not working?

Or suggest us any better option to do this using pro toolkit api.

Waiting for your response.

ProMdl mdl = NULL;
status = ProMdlCurrentGet((ProMdl*)&mdl);

ProGtolAttach attach;
ProAnnotationPlane plane;
Pro3dPnt textPnt;
ProPath valueStr;
ProSelection* sels = NULL;int nSels = 0;
ProGtolleader leader1, * leaders = NULL;

status = ProGtolAttachAlloc(mdl, &attach);
//Set desired annoation plane( from Annotation Plane Manager)plane.id = 1; plane.owner = mdl; plane.type = PRO_ANNOT_PLANE;
//location of gtol text in model co-ordinates as per the requirementtextPnt[0] = 150.00; textPnt[1] = 500.00; textPnt[2] = -200.00;
//dimension for attaching ProDimension dim;
ProSelection p_sel;
status = ProModelitemInit(mdl, 6, PRO_DIMENSION, (ProModelitem*)&dim);

ProPoint3d loc;
loc[0] = 10;
loc[1] = -20;
loc[2] = 30;
status = ProSelectionDimWitnessLineSet(&dim, 2, loc, &p_sel);
status = ProGtolleaderAlloc(PROLEADERTYPE_LEFTHALF, p_sel, &leader1);
status = ProArrayAlloc(1, sizeof(ProGtolleader), 1, (ProArray*)&leaders);
leaders[0] = leader1;

status = ProGtolAttachLeadersSet(attach, &plane, PRO_GTOL_LEADER, leaders, textPnt);

Thanks and Regards,

Vinod Gaikwad

Announcements


Top Tags