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
 Origin Forum
 "Add function graph" auto-naming fails

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
Jose Posted - 03/06/2000 : 8:41:00 PM
In Origin 6.0, if I have some function graphs in different layers over the project, and I have deleted some of the first ones so only F4, F5, F7 and F8 left, and I want to Add function graph again, it is quite usual that the dialog that appears is not the Plot Details for F9 (or F1, that don't exist, and could be OK), but that for F4.

This is not what I want, of course: I don't want to do without F4. But if I then press Cancel, F4 is deleted. I have to press OK if I want to keep F4 there. After this, it doesn't matter how many times I select Add function graph: always appears F4's definition dialog. When I get tired of this I write my new function over F4, changing its functionality F4(x)=. After this it may be F5 that has the same problem, or it can temporaly work properly letting me define F2 or F6 (!) before forcing me to overwrite F5 or F7.

As an example of this, feel free to download one of my projects (7.5 kB). I've deleted all the worksheets and almost all the graphs. Only functions and one graph left. Active layer #2 (the one below) and try to add a new function!

Has anyone experienced something similar? Am I doing something wrong? Is there any way to let me name the functions I create, or is it always an automatic process? Has this auto-naming process a correspondant script that I could check or modify?

Thanks in advance.

------------------
Jose Viņa

[This message has been edited by Jose (edited 03-06-2000).]

7   L A T E S T    R E P L I E S    (Newest First)
Jose Posted - 03/08/2000 : 8:34:00 PM
Ho, ho! Thanks a lot! Appart from solving my problem you have taught to me some nice tricks with this answer!

Some minor details:

- You missed a semicolon at the end... didn't you?

del -m ErrorProc;

- On your third line from the end shouldn't you use curly brackets?

def ErrorProc {del %B};

(I don't understand very well the use of this last three lines, but I imagine it has to do with some internal use of the ErrorProc macro by the set command...)

Jose.

Jose Posted - 03/08/2000 : 8:32:00 PM
Another minor problem:

if I run this new newfunction macro from the script window and I cancel the operation in the dialog, I get a non-important #Command error! caused by... what?

(I am using your corrected macro, with proper def ErrorProc {del %B;};)

Gary Lane Posted - 03/08/2000 : 8:19:00 PM
Hi...

Glad you are all set with this one. The semi-colon should definitely be there and I think the [ ]'s in place of the { }'s is an archaic notation. Anyway, I updated the post...thanks!

The set %B; command opens the Plot Details dialog box providing an interface to enter the new function. The ERRORPROC macro gets executed if you click the Cancel button in the Plot Details dialog box. This is why your old existing functions were deleted as you reported above. My naming fix should prevent this problem from happening anymore.

I enjoyed working on this problem...thanks.

-Gary

Gary Lane Posted - 03/08/2000 : 5:05:00 PM
You shouldn't run the NewFunction macro on the command line by itself without first executing the GetEnumWin macro. At the very least, a Function or Graph window should be active prior to executing the NewFunction macro.

Try:

GetEnumWin Function;
NewFunction;

Also, canceling out of a dialog box automatically generates a command error.

Jose Posted - 03/07/2000 : 8:50:00 PM
That's what I told you: you are not decreasing in numbers, you are deleting every function each time you press Cancel (try to add them to any layer, you won't see them!), so the next time you "Add function..." it is the previous one that appears.

Looks like a bug!? (Oops! I realize I should have reported this to the bug section: I'll do it now.)

hschaefer Posted - 03/07/2000 : 8:46:00 PM
Hi,

following your instructions, I first get also Layer2-F3 with its many-decimals-equation in that dialog.

But after using the Cancel-button and immediately trying to add a function-graph again, I then get Layer2-F2 with a different, short equation: 4.0e4*x^(-1). ?!

Now, using Cancel again, suddenly leads to F1. (Couldnīt decrease it to F-1 :-)

Strange!

Hubert

Gary Lane Posted - 03/07/2000 : 5:19:00 PM
Hi,

Thanks for reporting this problem. I will notify our developers. In the mean time, I have a work around for you. Open the text file MACROS.CNF (in your origin software folder) using any text editor and copy/paste the script below at the very end of the file. Save and then exit from the MACROS.CNF file. After restarting Origin you should be all set...let me know if you still have problems.

-Gary



def newfunction {
for(ii=1;ii>0;ii++) {
%B=F$(ii);
if(exist(%B)==1) continue;
break;
};
create %B -f 10;
def ErrorProc {del %B;};
set %B;
del -m ErrorProc;
}

[This message has been edited by Gary Lane (edited 03-08-2000).]


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