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

Naming Drawing Table

MrSteveR_3
8-Gravel

Naming Drawing Table

Hey guys,

 

I have created a table with ProDrawingTableCreate command, and I wonder if there is a way to rename it.

Do you know a command that does it?

 

Thank you very much!

1 ACCEPTED SOLUTION

Accepted Solutions

If there's an application that creates the drawing tables it might be useful to let it additionally store the ProModelitem id's of the created tables inside drawing parameters or external data slots. Use these id's later for ProModelitemInit to get the table handles.

But this is no option for legacy drawings of course. 

View solution in original post

12 REPLIES 12

Have you already tried ProModelitemNameSet?

Well, I just tested it and the table name has not changed.

Does the function return PRO_TK_NO_ERROR or any other ProError?

Maybe try to update the drawing tree via ProDrawingtreeRefresh for the case that renaming works but the change is not displayed.

I get PRO_TK_BAD_INPUTS with ProModelitemNameSet((ProModelitem*)&table, L"New_Name"); 

(table is the ProDwgtable)

I'm afraid changing name of ProDwgtable is not supported 😕

 

Sets or resets the name of the model item.

The valid types (p_item->type) are as follows:

If you pass any other type, the function returns PRO_TK_BAD_INPUTS.

I would confirm the same - no API supported to drw_table rename.

I checked, that I couldn't rename the drw table even with the Object Toolkit API (with pfcModelItem-> SetName ()).

Ok, thank you!

The ability to name a table would be incredibly useful for automation purposes.  Currently (for the last 20 years) I have to go in and check table sizes, cell sizes, sheet number, and maybe even read some contents to positively identify a table.  Even then thats not foolproof.

If there's an application that creates the drawing tables it might be useful to let it additionally store the ProModelitem id's of the created tables inside drawing parameters or external data slots. Use these id's later for ProModelitemInit to get the table handles.

But this is no option for legacy drawings of course. 

Yes, we have 

typedef struct prodrw_tbl_info
{

int rotation;

double seg_origin[3];

int nrows; int ncols;

double outline[2][3];

double seg_char_height;

double table_char_height;

double char_width;

Prodrw_tbl_info;

but not the Name 😪, which could greatly facilitate the identification of the table.

FV
17-Peridot
17-Peridot
(To:MrSteveR_3)

Hi all,

 

Did anybody check if getter functions ProModelitemByNameInit(),  ProModelitemNameGet()

would work for ProDwgtable? Even if a name could be assigned how would you handle a visit and/or filter function?

 

Creo UI's 'Search Tool' does not even give an end user the option to find a drawing table 'By Name' - options are 'By ID' or 'By Layer' or 'All'. This is a clear sign that whoever wrote drawing tree - table name functionality did not 'bind' editable node's name back to the underlying ProDwgtable...

 

As Fabian mentioned - store table ids...

 

FV.

 

MrSteveR_3
8-Gravel
(To:FV)

I tried ProModelitemByNameInit and ProModelitemNameGet, and ProModelitemNameSet. Nothing works.

Announcements