T O P I C R E V I E W |
drreaf |
Posted - 12/12/2009 : 4:47:30 PM Origin Ver. and Service Release: Prof. 8.0 SR6 Operating System: XP Prof.
With MrgLng$=data1_B (an existing dataset) and with LETsplit=31.45, e.g., after the call:
splt = testlocation( MrgLng$ , LETsplit);
to the function shown below, the name splt is identified in the LabTalkVariables window (opened by the edit-command) as
Type: “LooseDataSet“, subtype: “double“ with the value: “<1x2903>“
instead of the defined Type: “Numeral“, subtype: “double“ with an appropriate numerical value.
Any suggestions ???
Regards, Rainer
Dr. Rainer Facius, German Aerospace Center
/*****************************************************************/ double testlocation(string xxnm, double x) { unsigned int n,ju,jm,jl;
Dataset xx;
if( !xx.Attach(xxnm) ) // Attach Origin C Dataset object xx to Origin data set "xxnm" return(-2.); // non existent
n=xx.GetSize(); if(n==0) return(-1); // empty
if( x>xx[n-1]) { return((double)n); } if( x<xx[0]) { return(0.); }
// < …zip, no returns in between>
return((double)jl); }
|
6 L A T E S T R E P L I E S (Newest First) |
drreaf |
Posted - 01/16/2010 : 6:20:52 PM Hi Max,
thanks for your reply, however your suggestions do not what I intended.
The “doc –n” command essentially erases the whole project, which creates the same state as immediately after starting ORIGIN and which I do not want.
I also tried several of the delete options and found none which achieved what I describe below.
If you open the “LabTalk-Variables and –Functions“ window with the “edit” command, then you see a list variables which you created in your LT scripts.
It is the set of these variables which I want to erase, in other words, I want to ‘undo’ all declarations and assignments made during all my commands (manually as well as in scripts) while preserving all the folders in the project explorer and the graph and worksheet windows – including their contents. Thereby I can ‘clean’ the workspace from all the ‘corpses’ and ‘scrap’ which usually accumulates during program development when I work for many days on the development of a project, saving and opening it –together with my data - again and again, creating new and deleting/renaming variables many times.
Presently, I achieve this ‘cleansing’ by highlighting/selecting the entries in the “LabTalk-Variables and –Functions“ window and then pressing the ‘delete’ button of this window. Then with the speed of two to three entries per second this window is cleared. All the other objects of the project remain intact.
What I look for is a “erase” command which does this ‘cleansing’ easier and faster.
Regards, Rainer
Dr. Rainer Facius, DLR, German Aerospace Center
|
minimax |
Posted - 01/15/2010 : 05:08:57 AM Hi Rainer,
Command "document -n" may help, see wiki http://wiki.originlab.com/~originla/wiki/index.php?title=LabTalk:Document_%28command%29
For example, you can "doc -s;doc -n;" to clean the workspace without promopt.
If you want to delete certain type of variable, you can use delete command: http://wiki.originlab.com/~originla/wiki/index.php?title=LabTalk:Delete_%28command%29
Max OriginLab Technical Support |
drreaf |
Posted - 01/14/2010 : 2:45:17 PM CP
After receipt two days ago of the O81 SR1 release, this problem indeed vanished – however only after I explicitly erased all my own variables from the project workspace by 1. typing the ‘edit’ command, 2. highlighting manually all my variables in the list, 3. pressing the delete button.
Is there any other way (a specific LT command) to clear a project workspace from all own previous declarations/assignments more easily - and faster?
Rainer Facius, DLR, German Aerospace Center
|
drreaf |
Posted - 12/13/2009 : 5:16:15 PM CP,
upon scrutinizing the LabTalk variables window in one of my projects, I realize that about a dozen variables which I suppose to be numerals are typified as LooseDatsets-double with values shown as <1x…>. They all arise either directly or indirectly from assignments to OC functions declared as double with some of the arguments beeing declared dataset names and the other scalar numerals, the latter being initialized by assignment statements or normal arithmetic expressions. I checked that all of these scalar numerals are shown as such, usually as float, with proper values.
???
Regards, Rainer
BTW: the projects which I mentioned to be performing properly and which I now have to port to O8.0 were all created with Origin Pro 7.5
|
drreaf |
Posted - 12/13/2009 : 03:58:34 AM Hi CP,
the LabTalk Variables window identifies my variable LETsplit as
Type: "Numeral", subtype: "float" with a proper numerical value.
I have already ordered 8.1 but -
all the problems I reported lately arise in projects which have been producing correct results since years. :-(
Rainer
|
cpyang |
Posted - 12/13/2009 : 12:06:56 AM I do not see a problem in 81, and I don't recall 80SR6 has such a bug. Maybe you can check to see if LETsplit also existed as a loose dataset already? You can check in ed dialog or by
list s
If a dataset is passed into a double, then vectorization will take place and double return will become a vector, namely a dataset.
CP
|
|
|