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

Community Tip - Stay updated on what is happening on the PTC Community by subscribing to PTC Community Announcements. X

Export multiple lines cell text

AlexCote
7-Bedrock

Export multiple lines cell text

Hi,

I have a toolkit that export a table into a text file the way I need it to be ... this part is fine.

 

The problem I am facing is that some time a cell may have is text on two lines (into the same cell).

Anyone knows if there's a way to export that, right now I am only getting the first line in the cell.

This is the function I am using:

error = ProDwgtableCelltextGet(&CurrTbl, ii, i, ProParamMode(1), CellText);

Thanks

 

1 ACCEPTED SOLUTION

Accepted Solutions

Here's the solution ... did not find it on my own, got help from PTC

status = ProDwgtableCelltextGet(&tables[iter],1,1,(ProParamMode)1,&getLines);
status = ProArraySizeGet((ProArray)getLines,&arrSize);
for(int ii=0;ii<arrSize;ii++) { char buffer[100] = "\0"; ProWstringToString(buffer,getLines[ii]); } status = ProArrayFree((ProArray*)&getLines);

Have a nice day

View solution in original post

2 REPLIES 2
FV
17-Peridot
17-Peridot
(To:AlexCote)


@AlexCote wrote:

Hi,

I have a toolkit that export a table into a text file the way I need it to be ... this part is fine.

 

The problem I am facing is that some time a cell may have is text on two lines (into the same cell).

Anyone knows if there's a way to export that, right now I am only getting the first line in the cell.

This is the function I am using:

error = ProDwgtableCelltextGet(&CurrTbl, ii, i, ProParamMode(1), CellText);

Thanks

 


it is quite doubtful that the function arguments are correct.

perhaps 'K&R C Programming Language', chapter #5  would help...

https://archive.org/details/CProgrammingLanguage2ndEditionByBrianW.KernighanDennisM.Ritchie/page/n95

 

Here's the solution ... did not find it on my own, got help from PTC

status = ProDwgtableCelltextGet(&tables[iter],1,1,(ProParamMode)1,&getLines);
status = ProArraySizeGet((ProArray)getLines,&arrSize);
for(int ii=0;ii<arrSize;ii++) { char buffer[100] = "\0"; ProWstringToString(buffer,getLines[ii]); } status = ProArrayFree((ProArray*)&getLines);

Have a nice day

Top Tags