Get Help

Turn on suggestions

Auto-suggest helps you quickly narrow down your search results by suggesting possible matches as you type.

Showing results for

- Community
- :
- Creo Parametric
- :
- Detailing (MBD/ MBE)
- :
- How to insert table to the right upper corner of t...

Options

- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page

Auto-suggest helps you quickly narrow down your search results by suggesting possible matches as you type.

Showing results for

- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Notify Moderator

09-22-2016
04:24 AM

09-22-2016
04:24 AM

Hi,

when I am creating new table or inserting it by ProDrawingTableCreate or ProDwgtableRetrieve I have to specify the origin - the point where the table is inserted.

This point is in screen coordinates, but I need to place the table to concrete position (for example right upper corner) on the drawing, not on screen. How to recalculate the drawing position to the screen coordinates?

Tom

Solved! Go to Solution.

1 ACCEPTED SOLUTION

Accepted Solutions

Highlighted

- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Notify Moderator

09-22-2016
09:25 AM

09-22-2016
09:25 AM

You need the transformation matrix from drawing coordinates to screen coordinates.

What I found that work best for me is to get the transformation from screen to drawing coordinates first using ProDrawingSheetTrfGet function

Then I calculate the inverse matrix. Use the inverse matrix in ProPntTrfEval function to get the screen coordinates.

Here is a sample code:

status = ProDrawingSheetTrfGet(drawing,1,drw_size,matrix1);

ProUtilMatrixInvert(matrix1,matrix2);

ProPntTrfEval(drw_point,matrix2,scr_point);

status = ProDwgtableRetrieve(drawing, tableName, table_path, 0, scr_point, NULL, NULL, &table);

status = ProDwgtableDisplay(&table);

You can find the ProUtilMatrixInvert function in <Creo load point>\protoolkit\protk_appls\pt_examples\pt_utils\UtilMatrix.c

3 REPLIES 3

Highlighted
##

- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Notify Moderator

09-22-2016
05:51 AM

09-22-2016
05:51 AM

Re: How to insert table to the right upper corner of the drawing

Hi,

When placing the table, right after selecting the table file a little window pops up that allows to switch to placement based on absolute coords of the drawing.

If you got the table origin at the correct corner of the table you could just specify absolute drawing coords of the corner of your drawing to place it there.

It's just too bad i can't post a picture of the window cause i have no available Creo licence at the moment.

Highlighted

- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Notify Moderator

09-22-2016
09:25 AM

09-22-2016
09:25 AM

You need the transformation matrix from drawing coordinates to screen coordinates.

What I found that work best for me is to get the transformation from screen to drawing coordinates first using ProDrawingSheetTrfGet function

Then I calculate the inverse matrix. Use the inverse matrix in ProPntTrfEval function to get the screen coordinates.

Here is a sample code:

status = ProDrawingSheetTrfGet(drawing,1,drw_size,matrix1);

ProUtilMatrixInvert(matrix1,matrix2);

ProPntTrfEval(drw_point,matrix2,scr_point);

status = ProDwgtableRetrieve(drawing, tableName, table_path, 0, scr_point, NULL, NULL, &table);

status = ProDwgtableDisplay(&table);

You can find the ProUtilMatrixInvert function in <Creo load point>\protoolkit\protk_appls\pt_examples\pt_utils\UtilMatrix.c

Highlighted
##

- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Notify Moderator

09-22-2016
10:18 AM

09-22-2016
10:18 AM

Re: How to insert table to the right upper corner of the drawing

Thank you Gabriel, this is what I was looking for.