Passing variables from a form to OCEAN script
CADForums.net Forum Index CADForums.net
Discussion of AutoCAD and other CAD software.
 
 FAQFAQ   MemberlistMemberlist     RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 
 
Google
 
Web cadforums.net
Passing variables from a form to OCEAN script

 
Post new topic   Reply to topic    CADForums.net Forum Index -> Cadence
Author Message
Dmitriy Shurin
Guest





Posted: Tue Oct 05, 2004 2:55 pm    Post subject: Passing variables from a form to OCEAN script Reply with quote

Hi!
I wrote a menu in SKILL which contains several forms. For example the
user has to fill library and cellview to be simulated and the
simulations to be done. If i do the following:
..
..
..
load "skill.il"
design(library cell "schematic")
..
..
..
where library and cell are global variables which are defined in SKILL,
the variables library and cell remain empty because user hasn't defined
them yet and i get an error message. The question is: if the user
defines those variables in the form later will the current design
change?
If not is there any way that the user could set all values in the forms
and only then the rest of the script will be executed?


--
Posted via Mailgate.ORG Server - http://www.Mailgate.ORG

Back to top
Dmitriy Shurin
Guest





Posted: Tue Oct 05, 2004 4:51 pm    Post subject: Re: Passing variables from a form to OCEAN script Reply with quote

I have already tried that. If i try to load OCEAN script i get an error.
The way i load the script is writing in the form:
?callback "load("oceanscript.ocn")"
but i get an error on that line. Do i do anything wrong here?


--
Posted via Mailgate.ORG Server - http://www.Mailgate.ORG
Back to top
Bernd Fischer
Guest





Posted: Tue Oct 05, 2004 7:36 pm    Post subject: Re: Passing variables from a form to OCEAN script Reply with quote

You normaly do such things with
a form callback and not with global variables.

Then the only global varaible yo need is the form data structure itself.

- create and display the form
- the form callback calls the your ocean script
- the form field values are requeste form your ocean script
formDataStruct->formField->value

This are very basics in how user interfaces work in SKILL and can't
be explained exactly to what you need.
I rather sugest you to read the
'Cadence User Inerfaces SKILL Functions Reference' manual in cdsdoc.

Bernd

Dmitriy Shurin wrote:
Quote:
Hi!
I wrote a menu in SKILL which contains several forms. For example the
user has to fill library and cellview to be simulated and the
simulations to be done. If i do the following:
.
.
.
load "skill.il"
design(library cell "schematic")
.
.
.
where library and cell are global variables which are defined in SKILL,
the variables library and cell remain empty because user hasn't defined
them yet and i get an error message. The question is: if the user
defines those variables in the form later will the current design
change?
If not is there any way that the user could set all values in the forms
and only then the rest of the script will be executed?



Back to top
Bernd Fischer
Guest





Posted: Tue Oct 05, 2004 9:22 pm    Post subject: Re: Passing variables from a form to OCEAN script Reply with quote

Build a procedure around your ocean script

procedure( myOceanScript( formDataStruct )
bla bla
e.g. formDataStruct->cellNameField->value

bla bla
do the script what ever
)

The file which includes the script must be present before
the callback gets called, so you can load it now without
it gets executed immediately while loading it.

Then you can use the procedure 'myOceanScript' as callback
procedure for you form.

?callback 'myOceanScript

This should help you, and read the manual.

PS: Also it would help people her if you
post example SKILL code or at least the error msg. you
get.
I get an error is not very helpful at all DFII has thousands of
error messages.

Bernd

Dmitriy Shurin wrote:
Quote:
I have already tried that. If i try to load OCEAN script i get an error.
The way i load the script is writing in the form:
?callback "load("oceanscript.ocn")"
but i get an error on that line. Do i do anything wrong here?

Back to top
 
Post new topic   Reply to topic    CADForums.net Forum Index -> Cadence All times are GMT
Page 1 of 1

 
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum




Windows Server DSP VoIP Electronics New Topics
Contact Us
Powered by phpBB