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

Community Tip - Want the oppurtunity to discuss enhancements to PTC products? Join a working group! X

Naming Drawing Table

MrSteveR_3
14-Alexandrite

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!

ACCEPTED SOLUTION

Accepted Solutions
FabianWolf
13-Aquamarine
(To:msteffke)

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
FabianWolf
13-Aquamarine
(To:MrSteveR_3)

Have you already tried ProModelitemNameSet?

MrSteveR_3
14-Alexandrite
(To:FabianWolf)

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

FabianWolf
13-Aquamarine
(To:MrSteveR_3)

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.

MrSteveR_3
14-Alexandrite
(To:FabianWolf)

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

(table is the ProDwgtable)

FabianWolf
13-Aquamarine
(To:MrSteveR_3)

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.

zemanekp
14-Alexandrite
(To:FabianWolf)

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

MrSteveR_3
14-Alexandrite
(To:FabianWolf)

Ok, thank you!

msteffke
14-Alexandrite
(To:FabianWolf)

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.

FabianWolf
13-Aquamarine
(To:msteffke)

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. 

MrSteveR_3
14-Alexandrite
(To:msteffke)

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
14-Alexandrite
(To:FV)

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

Announcements


Top Tags