I am using the toolkit to get entry-port parameters from an assembly model. Right now I am able to read the name of the entry-port coordinate systems of an given component. Now I would like to get the global coordinates of these entry-port.
Is there a way to read the global coordinates from the name of an entry-ports via toolkit? I didn't even find that information in Creo directly.
Thanks a lot
Solved! Go to Solution.
Take a look
Transforming Coordinates of an Assembly Member
• ProAsmcomppathTrfGet()
Take a look
Transforming Coordinates of an Assembly Member
• ProAsmcomppathTrfGet()
Thanks, that worked out.
Here my example code if anyone needs it:
ProMatrix matrix;
ProAsmcomppath comp_path;
ProSelection* p_sel3;
ProPoint3d p3d;
ProPoint3d t_point;
int n_sel3;
ProError status;
status = ProSelect("csys", 1, NULL, NULL, NULL, NULL, &p_sel3, &n_sel3); // select Entry-Port
status = ProSelectionPoint3dGet(p_sel3[0], p3d); // get local coordinates
status = ProSelectionAsmcomppathGet(p_sel3[0], &comp_path); // get ID-Table
status = ProAsmcomppathTrfGet(&comp_path, PRO_B_TRUE, matrix); // get matrix for transformation
status = ProPntTrfEval(p3d, matrix, t_point); // transform to global coordinates
Thanks for the code!
I didn‘t test this behavior, but the Selection Point is where you have selected an item, it may a Shortcuts for some types like points , line end, csys, …. but i would use the origin data.
What ever man...
Upps, sorry my intend was not to bother you. But I got your point.