| T O P I C R E V I E W |
| tinkusch |
Posted - 05/27/2002 : 05:05:15 AM Origin v7.0 SR1, German Win98
Hi
The command 'clearworksheet' shows a somewhat peculiar behavior: Create a worksheet 'mywks' with let's say 500 rows and three columns, labeled X, Y and L. Fill it with some data. After that clear the wks with the labtalk command 'clearworksheet mywks'. The entries disappear from the wks and the number of rows is set to 30, which is ok. If one then executes the following Origin-C program :
int Test() { Dataset Res1("mywks_X"); Dataset Res2("mywks_Y"); Dataset Res3("mywks_L"); Res1.SetSize(500); Res2.SetSize(500); Res3.SetSize(500); return 0; }
the old content of mywks is restored again! It is also restored, if the C-program is compiled after the command clearworksheet, and then executed. How do I really get rid of it?
Stefan |
| 2 L A T E S T R E P L I E S (Newest First) |
| tinkusch |
Posted - 05/28/2002 : 03:05:08 AM That works, thanks, CP!
Stefan |
| cpyang |
Posted - 05/27/2002 : 3:14:19 PM ClearWorksheet is a macro, as you can see by typing
def ClearWorksheet;
and it is only resizing the display range without setting the cells to missing values. Which is a different behavior then the ClearWorksheet context menu command when right click in the empty space in the worksheet. This is something that we need to fix in the future for consistency.
For now, you can ensure your worksheet is filled with missing values by simply adding
Res1=get_missing_value(); Res2=get_missing_value(); Res3=get_missing_value();
to your Origin C function, after your call to SetSize.
CP
|
|
|