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

Community Tip - Have a PTC product question you need answered fast? Chances are someone has asked it before. Learn about the community search. X

Get global coordinates of entry-port coordinate system with toolkit

Tim_1996
7-Bedrock

Get global coordinates of entry-port coordinate system with toolkit

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

1 ACCEPTED SOLUTION

Accepted Solutions

Take a look

Transforming Coordinates of an Assembly Member
• ProAsmcomppathTrfGet()

View solution in original post

6 REPLIES 6

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!

RPN
17-Peridot
17-Peridot
(To:Tim_1996)

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.

Tim_1996
7-Bedrock
(To:RPN)

What ever man...

RPN
17-Peridot
17-Peridot
(To:Tim_1996)

Upps, sorry my intend was not to bother you. But I got your point.

Top Tags