The Origin Forum
File Exchange
Try Origin for Free
The Origin Forum
Home | Profile | Register | Active Topics | Members | Search | FAQ | Send File to Tech support
 All Forums
 Origin Forum for Programming
 Forum for Origin C
 clearworksheet does not clear

Note: You must be registered in order to post a reply.
To register, click here. Registration is FREE!

Screensize:
UserName:
Password:
Anti-Spam Code:
Format Mode:
Format: BoldItalicizedUnderlineStrikethrough Align LeftCenteredAlign Right Horizontal Rule Insert HyperlinkUpload FileInsert Image Insert CodeInsert QuoteInsert List
   
Message:

* HTML is OFF
* Forum Code is ON
Smilies
Smile [:)] Big Smile [:D] Cool [8D] Blush [:I]
Tongue [:P] Evil [):] Wink [;)] Clown [:o)]
Black Eye [B)] Eight Ball [8] Frown [:(] Shy [8)]
Shocked [:0] Angry [:(!] Dead [xx(] Sleepy [|)]
Kisses [:X] Approve [^] Disapprove [V] Question [?]

 
Check here to subscribe to this topic.
   

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



The Origin Forum © 2020 Originlab Corporation Go To Top Of Page
Snitz Forums 2000