cancel
Showing results for 
Search instead for 
Did you mean: 
Security Alert Log4j Security Vulnerability. Click here to know more.
cancel
Showing results for 
Search instead for 
Did you mean: 

Get global coordinates of entry-port coordinate system with toolkit

Tim_1996
5-Regular Member

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()

View solution in original post

Tim_1996
5-Regular Member
(To:ysinitsyn)

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

VladimirN
23-Emerald IV
(To:Tim_1996)

Thanks for the code!

RPN
14-Alexandrite
14-Alexandrite
(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
5-Regular Member
(To:RPN)

What ever man...

RPN
14-Alexandrite
14-Alexandrite
(To:Tim_1996)

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

Announcements