[GiDlist] InitGIDProject-LoadGIDProject

Moderator: GiD Team

VSayako Willy

[GiDlist] Create New Menu in GiD and commands inside GiD for

Post by VSayako Willy »

Hi all of GiD Team

Can we create menu inserted between Meshing
'NewMenu' and Calculate?, instead of Calculate
.... and help menus??
The reason is that after getting anything done in this
NewMenu then we go for Calculate menu as a
sequence. Just a thought and opinion!!
*************************************
I found some commands in ProblemType.tcl file in your
attached problem examples such as:
-GidChangeDataLabel-
-GidAddUserDataOptionsMenu-
-GidAddUserDataOptions-
-GidOpenProblemData-
-GidOpenconditions-
Where can I find those commands mentioned in the
online documents? What are those different from the
following commands:
-CreateMenu
-InsertMenuOption..etc.
which are mentioned in the online documents.

With my best regards.



__________________________________________________
Do you Yahoo!?
New DSL Internet Access from SBC & Yahoo!
http://sbc.yahoo.com
Enrique Escolano

[GiDlist] Create New Menu in GiD and commands inside GiD for

Post by Enrique Escolano »

See the definiton of the procedure CreateMenu, inside the file dev_kit.tcl (located in /scripts of GiD)

You can write in your problem type (¡¡never modify the scripts of GiD!!) a similar modified function

The definition of the GiD menus is stored in some global arrays:
for preprocess: MenuNames MenuEntries MenuCommands MenuAcceler
for postprocess: MenuNamesP MenuEntriesP MenuCommandsP MenuAccelerP

UpdateMenus recreated the menus from the values of this array.

To insert a menu in this positon: ... Meshing 'NewMenu' Calculatehelp
You only need add to the string list MenuNames a new item 'NewMenu' in the position last-2,
and now move the array ( MenuEntries MenuCommands MenuAcceler) of the menus "Calculate" and "Help"
to the right: last-1 to last and last-2 to last-1

This is a untested sample:

proc MytTestCreateMenu {new_menu_name} {
global MenuNames MenuEntries MenuCommands MenuAcceler

set last [llength $MenuNames]
set pos1 [expr $last-1]
set pos2 [expr $last-2]

set MenuNames [linsert $MenuNames $pos "$new_menu_name"]
set MenuEntries($last) $MenuEntries($pos1)
set MenuCommands($last) $MenuCommands($pos1)
set MenuAcceler($last) $MenuAcceler($pos1)

set MenuEntries($pos1) $MenuEntries($pos2)
set MenuCommands($pos1) $MenuCommands($pos2)
set MenuAcceler($pos1) $MenuAcceler($pos2)

set MenuEntries($pos2) ""
set MenuCommands($pos2) ""
set MenuAcceler($pos2) ""
}

To create your menu, add this code to "problemtype".tcl, and use it inside InitGIDProject for example:

MytTestCreateMenu "NewMenu"
UpdateMenus


Regards

Enrique Escolano

----- Original Message -----
From: "VSayako Willy" vilaysako at yahoo.com
To: gidlist at gatxan.cimne.upc.es
Sent: Tuesday, October 01, 2002 9:59 AM
Subject: [GiDlist] Create New Menu in GiD and commands inside GiD for Tcl file.


Hi all of GiD Team

Can we create menu inserted between Meshing
'NewMenu' and Calculate?, instead of Calculate
.... and help menus??
The reason is that after getting anything done in this
NewMenu then we go for Calculate menu as a
sequence. Just a thought and opinion!!
*************************************
I found some commands in ProblemType.tcl file in your
attached problem examples such as:
-GidChangeDataLabel-
-GidAddUserDataOptionsMenu-
-GidAddUserDataOptions-
-GidOpenProblemData-
-GidOpenconditions-
Where can I find those commands mentioned in the
online documents? What are those different from the
following commands:
-CreateMenu
-InsertMenuOption..etc.
which are mentioned in the online documents.

With my best regards.



__________________________________________________
Do you Yahoo!?
New DSL Internet Access from SBC & Yahoo!
http://sbc.yahoo.com
_______________________________________________
GiDlist mailing list
GiDlist at gid.cimne.upc.es
http://gid.cimne.upc.es/mailman/listinfo/gidlist

-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://listas.cimne.upc.edu/pipermail/gidlist/attachments/20021004/9f4f0138/attachment.htm
VSayako Willy

[GiDlist] Length of the fields in ProblemType

Post by VSayako Willy »

Hi Enrique
Thanks so much for your advice. I have tried what
you sent to me about the tcl code but seems not to
work out. OK no problem I will try to work out more
but urgent thing that would like to ask is that:
(see also my attached file)
1. What is the limitation of the length field in the
mat,prb,or cnd file?? Same file I have but when
displaying in different computer sometime the length
of the file is skipped the line? see the windows in my
attached files:
What is the cause of this??? and how should we set it
up?

Best regards.




--- Enrique Escolano escolano at cimne.upc.es wrote:
See the definiton of the procedure CreateMenu,
inside the file dev_kit.tcl (located in /scripts of
GiD)

You can write in your problem type (¡¡never modify
the scripts of GiD!!) a similar modified function

The definition of the GiD menus is stored in some
global arrays:
for preprocess: MenuNames MenuEntries MenuCommands
MenuAcceler
for postprocess: MenuNamesP MenuEntriesP
MenuCommandsP MenuAccelerP

UpdateMenus recreated the menus from the values of
this array.

To insert a menu in this positon: ... Meshing
'NewMenu' Calculatehelp
You only need add to the string list MenuNames a new
item 'NewMenu' in the position last-2,
and now move the array ( MenuEntries MenuCommands
MenuAcceler) of the menus "Calculate" and "Help"
to the right: last-1 to last and last-2 to last-1

This is a untested sample:

proc MytTestCreateMenu {new_menu_name} {
global MenuNames MenuEntries MenuCommands
MenuAcceler

set last [llength $MenuNames]
set pos1 [expr $last-1]
set pos2 [expr $last-2]

set MenuNames [linsert $MenuNames $pos
"$new_menu_name"]
set MenuEntries($last) $MenuEntries($pos1)
set MenuCommands($last) $MenuCommands($pos1)
set MenuAcceler($last) $MenuAcceler($pos1)

set MenuEntries($pos1) $MenuEntries($pos2)
set MenuCommands($pos1) $MenuCommands($pos2)
set MenuAcceler($pos1) $MenuAcceler($pos2)

set MenuEntries($pos2) ""
set MenuCommands($pos2) ""
set MenuAcceler($pos2) ""
}

To create your menu, add this code to
"problemtype".tcl, and use it inside InitGIDProject
for example:

MytTestCreateMenu "NewMenu"
UpdateMenus


Regards

Enrique Escolano

----- Original Message -----
From: "VSayako Willy" vilaysako at yahoo.com
To: gidlist at gatxan.cimne.upc.es
Sent: Tuesday, October 01, 2002 9:59 AM
Subject: [GiDlist] Create New Menu in GiD and
commands inside GiD for Tcl file.


Hi all of GiD Team

Can we create menu inserted between Meshing
'NewMenu' and Calculate?, instead of
Calculate
.... and help menus??
The reason is that after getting anything done in
this
NewMenu then we go for Calculate menu as a
sequence. Just a thought and opinion!!
*************************************
I found some commands in ProblemType.tcl file in
your
attached problem examples such as:
-GidChangeDataLabel-
-GidAddUserDataOptionsMenu-
-GidAddUserDataOptions-
-GidOpenProblemData-
-GidOpenconditions-
Where can I find those commands mentioned in the
online documents? What are those different from
the
following commands:
-CreateMenu
-InsertMenuOption..etc.
which are mentioned in the online documents.

With my best regards.



__________________________________________________
Do you Yahoo!?
New DSL Internet Access from SBC & Yahoo!
http://sbc.yahoo.com
_______________________________________________
GiDlist mailing list
GiDlist at gid.cimne.upc.es
http://gid.cimne.upc.es/mailman/listinfo/gidlist





__________________________________________________
Do you Yahoo!?
Faith Hill - Exclusive Performances, Videos & More
http://faith.yahoo.com
-------------- next part --------------
A non-text attachment was scrubbed...
Name: Length of the fields.doc
Type: application/msword
Size: 54272 bytes
Desc: Length of the fields.doc
Url : http://listas.cimne.upc.edu/pipermail/gidlist/attachments/20021007/29b90e18/attachment.doc
Enrique Escolano

[GiDlist] Length of the fields in ProblemType

Post by Enrique Escolano »

This code is tested and it works. Add a menu named "NewMenu" before "Calculate",
and add a submenu calling a window to show the classical message "hello world".

proc InitGIDProject { dir } {
MytTestCreateMenu "NewMenu"
InsertMenuOption "NewMenu" "Hello" 0 "WarnWin \"Hello world!\"" "PRE"
UpdateMenus
}

proc MytTestCreateMenu {new_menu_name} {
global MenuNames MenuEntries MenuCommands MenuAcceler

set last [llength $MenuNames]
set pos1 [expr $last-1]
set pos2 [expr $last-2]

set MenuNames [linsert $MenuNames $pos2 "$new_menu_name"]
set MenuEntries($last) $MenuEntries($pos1)
set MenuCommands($last) $MenuCommands($pos1)
set MenuAcceler($last) $MenuAcceler($pos1)

set MenuEntries($pos1) $MenuEntries($pos2)
set MenuCommands($pos1) $MenuCommands($pos2)
set MenuAcceler($pos1) $MenuAcceler($pos2)

set MenuEntries($pos2) [list ""]
set MenuCommands($pos2) [list ""]
set MenuAcceler($pos2) [list ""]
}


In general unrecommended the use of too large names or excesive mumber of fields
(for problems of limitation of some internal data, and for visualization pourposes)

The names of materials and conditions are internally limited to 300 characters,
and the number of fields of a material is limited to 100 in some old procedures.
The lenght of a field is unlimited, but if it is too large, cannot be showed inside a window.

Some internal limits (e.j. the limit of 100 fields for a material) can be removed for the
next GiD 7.1.1-beta version.

The aspect of a window can change from a computer to another one, because it does not have
fixed size, It is packed dynamically. The aesthetic change can be due to the use of a different font.

Enrique

----- Original Message -----
From: "VSayako Willy" vilaysako at yahoo.com
To: gidlist at gatxan.cimne.upc.es
Sent: Monday, October 07, 2002 10:36 AM
Subject: [GiDlist] Length of the fields in ProblemType


Hi Enrique
Thanks so much for your advice. I have tried what
you sent to me about the tcl code but seems not to
work out. OK no problem I will try to work out more
but urgent thing that would like to ask is that:
(see also my attached file)
1. What is the limitation of the length field in the
mat,prb,or cnd file?? Same file I have but when
displaying in different computer sometime the length
of the file is skipped the line? see the windows in my
attached files:
What is the cause of this??? and how should we set it
up?

Best regards.




--- Enrique Escolano escolano at cimne.upc.es wrote:
See the definiton of the procedure CreateMenu,
inside the file dev_kit.tcl (located in /scripts of
GiD)

You can write in your problem type (¡¡never modify
the scripts of GiD!!) a similar modified function

The definition of the GiD menus is stored in some
global arrays:
for preprocess: MenuNames MenuEntries MenuCommands
MenuAcceler
for postprocess: MenuNamesP MenuEntriesP
MenuCommandsP MenuAccelerP

UpdateMenus recreated the menus from the values of
this array.

To insert a menu in this positon: ... Meshing
'NewMenu' Calculatehelp
You only need add to the string list MenuNames a new
item 'NewMenu' in the position last-2,
and now move the array ( MenuEntries MenuCommands
MenuAcceler) of the menus "Calculate" and "Help"
to the right: last-1 to last and last-2 to last-1

This is a untested sample:

proc MytTestCreateMenu {new_menu_name} {
global MenuNames MenuEntries MenuCommands
MenuAcceler

set last [llength $MenuNames]
set pos1 [expr $last-1]
set pos2 [expr $last-2]

set MenuNames [linsert $MenuNames $pos
"$new_menu_name"]
set MenuEntries($last) $MenuEntries($pos1)
set MenuCommands($last) $MenuCommands($pos1)
set MenuAcceler($last) $MenuAcceler($pos1)

set MenuEntries($pos1) $MenuEntries($pos2)
set MenuCommands($pos1) $MenuCommands($pos2)
set MenuAcceler($pos1) $MenuAcceler($pos2)

set MenuEntries($pos2) ""
set MenuCommands($pos2) ""
set MenuAcceler($pos2) ""
}

To create your menu, add this code to
"problemtype".tcl, and use it inside InitGIDProject
for example:

MytTestCreateMenu "NewMenu"
UpdateMenus


Regards

Enrique Escolano

----- Original Message -----
From: "VSayako Willy" vilaysako at yahoo.com
To: gidlist at gatxan.cimne.upc.es
Sent: Tuesday, October 01, 2002 9:59 AM
Subject: [GiDlist] Create New Menu in GiD and
commands inside GiD for Tcl file.


Hi all of GiD Team

Can we create menu inserted between Meshing
'NewMenu' and Calculate?, instead of
Calculate
.... and help menus??
The reason is that after getting anything done in
this
NewMenu then we go for Calculate menu as a
sequence. Just a thought and opinion!!
*************************************
I found some commands in ProblemType.tcl file in
your
attached problem examples such as:
-GidChangeDataLabel-
-GidAddUserDataOptionsMenu-
-GidAddUserDataOptions-
-GidOpenProblemData-
-GidOpenconditions-
Where can I find those commands mentioned in the
online documents? What are those different from
the
following commands:
-CreateMenu
-InsertMenuOption..etc.
which are mentioned in the online documents.

With my best regards.



__________________________________________________
Do you Yahoo!?
New DSL Internet Access from SBC & Yahoo!
http://sbc.yahoo.com
_______________________________________________
GiDlist mailing list
GiDlist at gid.cimne.upc.es
http://gid.cimne.upc.es/mailman/listinfo/gidlist





__________________________________________________
Do you Yahoo!?
Faith Hill - Exclusive Performances, Videos & More
http://faith.yahoo.com
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://listas.cimne.upc.edu/pipermail/gidlist/attachments/20021007/d5da321e/attachment.htm
VSayako Willy

[GiDlist] Can we modify the size of the buttons, entry and s

Post by VSayako Willy »

Hi
I would like to know if GiD allows the User modify
the size of the buttons inside GiD, like buttons
created in file .cnd, mat, prb.... Please take a look
the attached file.

Regards


__________________________________________________
Do you Yahoo!?
Y! Web Hosting - Let the expert host your web site
http://webhosting.yahoo.com/
Enrique Escolano

[GiDlist] Can we modify the size of the buttons, entry and s

Post by Enrique Escolano »

Using tcl/tk in a problem type, it is possible to redefine new user windows
for conditions, etc,
to be used instead the default ones, but it requires certain work.

Note, your "attached file" is missing.

Enrique

----- Original Message -----
From: "VSayako Willy" vilaysako at yahoo.com
To: gidlist at gatxan.cimne.upc.es
Sent: Friday, October 25, 2002 4:31 AM
Subject: [GiDlist] Can we modify the size of the buttons, entry and so in
GiD??



Hi
I would like to know if GiD allows the User modify
the size of the buttons inside GiD, like buttons
created in file .cnd, mat, prb.... Please take a look
the attached file.

Regards


__________________________________________________
Do you Yahoo!?
Y! Web Hosting - Let the expert host your web site
http://webhosting.yahoo.com/
_______________________________________________
GiDlist mailing list
GiDlist at gid.cimne.upc.es
http://gid.cimne.upc.es/mailman/listinfo/gidlist

VSayako Willy

[GiDlist] Can we modify the size of the buttons, entry and s

Post by VSayako Willy »

Hi Enrique
In my attached file I just show one window created
in .prb file and I need some changes.
1. If I need the Label (From the field name) start
from the left.
2. If I need to have some size of buttons or Entry
bigger or smaller depends on the desired use.



I think this time I have my attached file.

warm regards



--- Enrique Escolano escolano at cimne.upc.es wrote:
Using tcl/tk in a problem type, it is possible to
redefine new user windows
for conditions, etc,
to be used instead the default ones, but it requires
certain work.

Note, your "attached file" is missing.

Enrique

----- Original Message -----
From: "VSayako Willy" vilaysako at yahoo.com
To: gidlist at gatxan.cimne.upc.es
Sent: Friday, October 25, 2002 4:31 AM
Subject: [GiDlist] Can we modify the size of the
buttons, entry and so in
GiD??



Hi
I would like to know if GiD allows the User
modify
the size of the buttons inside GiD, like buttons
created in file .cnd, mat, prb.... Please take a
look
the attached file.

Regards


__________________________________________________
Do you Yahoo!?
Y! Web Hosting - Let the expert host your web site
http://webhosting.yahoo.com/
_______________________________________________
GiDlist mailing list
GiDlist at gid.cimne.upc.es
http://gid.cimne.upc.es/mailman/listinfo/gidlist


_______________________________________________
GiDlist mailing list
GiDlist at gid.cimne.upc.es
http://gid.cimne.upc.es/mailman/listinfo/gidlist




__________________________________________________
Do you Yahoo!?
Y! Web Hosting - Let the expert host your web site
http://webhosting.yahoo.com/
-------------- next part --------------
A non-text attachment was scrubbed...
Name: Can we adjust or modify the size of the button.zip
Type: application/x-zip-compressed
Size: 13625 bytes
Desc: Can we adjust or modify the size of the button.zip
Url : http://listas.cimne.upc.edu/pipermail/gidlist/attachments/20021025/d40d89d2/attachment.bin
Enrique Escolano

[GiDlist] Can we modify the size of the buttons, entry and s

Post by Enrique Escolano »

GiD read the fields in a generic mode, and it is not ready to customize the
look of each field.

It is possible to redefine your own window (and not use the GiD default
window), but it
seems a tedious work.
To create your own materials windows you can read the /scripts files (see
DataWindows.tcl) and
copy and modify some code in your problemtype.tcl file to overwrite the
standard procedure.

Enrique Escolano

----- Original Message -----
From: "VSayako Willy" vilaysako at yahoo.com
To: gidlist at gatxan.cimne.upc.es
Sent: Friday, October 25, 2002 11:30 AM
Subject: Re: [GiDlist] Can we modify the size of the buttons, entry and so
in GiD??


Hi Enrique
In my attached file I just show one window created
in .prb file and I need some changes.
1. If I need the Label (From the field name) start
from the left.
2. If I need to have some size of buttons or Entry
bigger or smaller depends on the desired use.



I think this time I have my attached file.

warm regards



--- Enrique Escolano escolano at cimne.upc.es wrote:
Using tcl/tk in a problem type, it is possible to
redefine new user windows
for conditions, etc,
to be used instead the default ones, but it requires
certain work.

Note, your "attached file" is missing.

Enrique

----- Original Message -----
From: "VSayako Willy" vilaysako at yahoo.com
To: gidlist at gatxan.cimne.upc.es
Sent: Friday, October 25, 2002 4:31 AM
Subject: [GiDlist] Can we modify the size of the
buttons, entry and so in
GiD??



Hi
I would like to know if GiD allows the User
modify
the size of the buttons inside GiD, like buttons
created in file .cnd, mat, prb.... Please take a
look
the attached file.

Regards


__________________________________________________
Do you Yahoo!?
Y! Web Hosting - Let the expert host your web site
http://webhosting.yahoo.com/
_______________________________________________
GiDlist mailing list
GiDlist at gid.cimne.upc.es
http://gid.cimne.upc.es/mailman/listinfo/gidlist


_______________________________________________
GiDlist mailing list
GiDlist at gid.cimne.upc.es
http://gid.cimne.upc.es/mailman/listinfo/gidlist




__________________________________________________
Do you Yahoo!?
Y! Web Hosting - Let the expert host your web site
http://webhosting.yahoo.com/
VSayako Willy

[GiDlist] How to connect the Tcl files in dir scripts

Post by VSayako Willy »

Hi Enrique
I have created the tcl files which will be used in
my problemType. In my ProblemType.tcl file I connected
with the following command:
source [file join $dir scripts xxxxxx.tcl]
I don't know if it's somewhere wrong?? but it says
that can't read the "dir"...I don't know if we should
add anything else more???
Actually while having not included the source command
the ProblemType.tcl is working well with other
options.

Generally how can we do to connect those tcl files in
scripts directory.

Regards

__________________________________________________
Do you Yahoo!?
HotJobs - Search new jobs daily now
http://hotjobs.yahoo.com/
Enrique Escolano

[GiDlist] How to connect the Tcl files in dir scripts

Post by Enrique Escolano »

if your command
source [file join $dir scripts xxxxxx.tcl]
is inside the proc InitGIDProject, then dir is a parameter of this procedure,
containing the path ot your problem type, else you are responsible
to set the variable dir with your desired path.
proc InitGIDProject { dir } {
...
source [file join $dir scripts xxxxxx.tcl]
...
}

If your problem type is
/problemtypes/sample.gid ,
then xxxxxx.tcl can be located in
/problemtypes/sample.gid/scripts/xxxxxx.tcl

Notes:
- You can store the parameter dir of InitGIDProject in another global variable to access to the problemtype directory inside another procedure

proc InitGIDProject { dir } {
global MySampleVar
set MySampleVar(ProblemTypePath) $dir
...
}

proc another { } {
global MySampleVar
source [file join $MySampleVar(ProblemTypePath) scripts xxxxxx.tcl]
...
}

- It is unrecommended to copy your own scripts in the /scripts directory of GiD, is best to copy it inside your own problemtype directory.

Enrique Escolano

----- Original Message -----
From: "VSayako Willy" vilaysako at yahoo.com
To: gidlist at gatxan.cimne.upc.es
Sent: Tuesday, October 29, 2002 11:30 AM
Subject: [GiDlist] How to connect the Tcl files in dir scripts



Hi Enrique
I have created the tcl files which will be used in
my problemType. In my ProblemType.tcl file I connected
with the following command:
source [file join $dir scripts xxxxxx.tcl]
I don't know if it's somewhere wrong?? but it says
that can't read the "dir"...I don't know if we should
add anything else more???
Actually while having not included the source command
the ProblemType.tcl is working well with other
options.

Generally how can we do to connect those tcl files in
scripts directory.

Regards

__________________________________________________
Do you Yahoo!?
HotJobs - Search new jobs daily now
http://hotjobs.yahoo.com/
_______________________________________________
GiDlist mailing list
GiDlist at gid.cimne.upc.es
http://gid.cimne.upc.es/mailman/listinfo/gidlist

-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://listas.cimne.upc.edu/pipermail/gidlist/attachments/20021029/f1a8de6e/attachment.htm
Post Reply