Skip to main content
1-Visitor
October 26, 2021
Solved

Get global coordinates of entry-port coordinate system with toolkit

  • October 26, 2021
  • 1 reply
  • 2563 views

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

Best answer by YaroslavSin

Take a look

Transforming Coordinates of an Assembly Member
• ProAsmcomppathTrfGet()

1 reply

17-Peridot
November 1, 2021

Take a look

Transforming Coordinates of an Assembly Member
• ProAsmcomppathTrfGet()

Tim_19961-VisitorAuthor
1-Visitor
November 4, 2021

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

24-Ruby III
November 4, 2021

Thanks for the code!