Skip to main content
1-Visitor
August 19, 2019
Solved

Export multiple lines cell text

  • August 19, 2019
  • 2 replies
  • 1514 views

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

 

Best answer by AlexCote

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

2 replies

August 20, 2019

@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

 

AlexCote1-VisitorAuthorAnswer
1-Visitor
August 22, 2019

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