[GiDlist] InitGIDProject-LoadGIDProject

Hello,

I would like to know exactly when the InitGIDProject and the LoadGIDProject procedures are called. Indeed, when I call DataProblem Types…, the LoadGIDProject is also called, and when I open a saved file, the InitGIDProject is called. Is it possible to avoid calling the InitGIDProject procedure when the problem type is selected?

Christophe Louis
-------------- next part --------------
An HTML attachment was scrubbed…
URL: http://listas.cimne.upc.edu/pipermail/gidlist/attachments/20020920/5e5405df/attachment.htm

InitGIDProject is a event generated by loading the problemtype, the argument provided is the
complete path of the directory .gid of this problem type

For example:
InitGIDProject C:/gid project/problemtypes/Test s/Vel Giro.gid

EndGIDProject is a event generated by unloading the problemtype.

LoadGIDProject is generated loading a model (also after load a problem type), the argument is the
complete path name of the file of this model to contain specific problemtype data (.spd extension)
For example:
LoadGIDProject C:/public/model.gid/model.spd

SaveGIDProject is generated if the user (or the automatic backup) save the model, it is an oportunity to the problem data to save some specific data in the spd file.

To test this events, use a WarnWinText command to show a debug message
For example, copy in ‘problemtype’.tcl this code:

proc InitGIDProject { dir } {
WarnWinText “InitGIDProject $dir”
}
proc InitGIDPostProcess {} {
WarnWinText “InitGIDPostProcess”
}
proc EndGIDProject {} {
WarnWinText “EndGIDProject. Falla si había cerrado esta ventana y cargo otro problem type”
}

proc LoadGIDProject { filespd } {
WarnWinText “LoadGIDProject $filespd”
}

proc SaveGIDProject { filespd } {
WarnWinText “SaveGIDProject $filespd”
}

proc LoadResultsGIDPostProcess { file } {
WarnWinText “LoadResultsGIDPostProcess $file”
}

proc EndGIDPostProcess {} {
WarnWinText “EndGIDPostProcess”
}

proc BeforeWriteCalcFileGIDProject { file } {
WarnWinText “BeforeWriteCalcFileGIDProject $file”
}

proc AfterWriteCalcFileGIDProject { file errcode} {
WarnWinText “AfterWriteCalcFileGIDProject $file $errcode”
}

Is it not possible to avoid the call to InitGIDProject, but if you not write a proc InitGIDProject, to make some action in response, this event is ignorated.

Enrique
----- Original Message -----
From: Christophe Louis
To: Gid
Sent: Friday, September 20, 2002 12:37 PM
Subject: [GiDlist] InitGIDProject-LoadGIDProject


Hello,

I would like to know exactly when the InitGIDProject and the LoadGIDProject procedures are called. Indeed, when I call DataProblem Types…, the LoadGIDProject is also called, and when I open a saved file, the InitGIDProject is called. Is it possible to avoid calling the InitGIDProject procedure when the problem type is selected?

Christophe Louis
-------------- next part --------------
An HTML attachment was scrubbed…
URL: http://listas.cimne.upc.edu/pipermail/gidlist/attachments/20020920/abffc85f/attachment.htm

In fact I would like to create a TCL/TK procedure which would be called once (and only once) when you define the problem type, and which wouldn’t appear every time you open a saved project.

Christophe Louis
----- Original Message -----
From: Enrique Escolano
To: gidlist at gatxan.cimne.upc.es
Sent: Friday, September 20, 2002 2:40 PM
Subject: Re: [GiDlist] InitGIDProject-LoadGIDProject


InitGIDProject is a event generated by loading the problemtype, the argument provided is the
complete path of the directory .gid of this problem type

For example:
InitGIDProject C:/gid project/problemtypes/Test s/Vel Giro.gid

EndGIDProject is a event generated by unloading the problemtype.

LoadGIDProject is generated loading a model (also after load a problem type), the argument is the
complete path name of the file of this model to contain specific problemtype data (.spd extension)
For example:
LoadGIDProject C:/public/model.gid/model.spd

SaveGIDProject is generated if the user (or the automatic backup) save the model, it is an oportunity to the problem data to save some specific data in the spd file.

To test this events, use a WarnWinText command to show a debug message
For example, copy in ‘problemtype’.tcl this code:

proc InitGIDProject { dir } {
WarnWinText “InitGIDProject $dir”
}
proc InitGIDPostProcess {} {
WarnWinText “InitGIDPostProcess”
}
proc EndGIDProject {} {
WarnWinText “EndGIDProject. Falla si había cerrado esta ventana y cargo otro problem type”
}

proc LoadGIDProject { filespd } {
WarnWinText “LoadGIDProject $filespd”
}

proc SaveGIDProject { filespd } {
WarnWinText “SaveGIDProject $filespd”
}

proc LoadResultsGIDPostProcess { file } {
WarnWinText “LoadResultsGIDPostProcess $file”
}

proc EndGIDPostProcess {} {
WarnWinText “EndGIDPostProcess”
}

proc BeforeWriteCalcFileGIDProject { file } {
WarnWinText “BeforeWriteCalcFileGIDProject $file”
}

proc AfterWriteCalcFileGIDProject { file errcode} {
WarnWinText “AfterWriteCalcFileGIDProject $file $errcode”
}

Is it not possible to avoid the call to InitGIDProject, but if you not write a proc InitGIDProject, to make some action in response, this event is ignorated.

Enrique
----- Original Message -----
From: Christophe Louis
To: Gid
Sent: Friday, September 20, 2002 12:37 PM
Subject: [GiDlist] InitGIDProject-LoadGIDProject


Hello,

I would like to know exactly when the InitGIDProject and the LoadGIDProject procedures are called. Indeed, when I call DataProblem Types…, the LoadGIDProject is also called, and when I open a saved file, the InitGIDProject is called. Is it possible to avoid calling the InitGIDProject procedure when the problem type is selected?

Christophe Louis
-------------- next part --------------
An HTML attachment was scrubbed…
URL: http://listas.cimne.upc.edu/pipermail/gidlist/attachments/20020920/c602c961/attachment.htm

Hello,

In fact, it should be fairly easy to check, at the beginning of
InitGIDProject, if your restrictive
conditions are met.

For example, you can check that the project name is UNKNOWN by using
.central.s info Project

Regards,


Compass Ing. y Sistemas Dr. Ramon Ribó
http://www.compassis.com ramsan at compassis.com
c/ Manuel Girona, 61 bajos tel. +34 93 204 10 82
08034 Barcelona, Spain fax. +34 93 204 19 09

-----Mensaje original-----
De: gidlist-admin at gatxan.cimne.upc.es
[mailto:gidlist-admin at gatxan.cimne.upc.es]En nombre de Christophe Louis
Enviado el: viernes, 20 de septiembre de 2002 15:00
Para: gidlist at gatxan.cimne.upc.es
Asunto: Re: [GiDlist] InitGIDProject-LoadGIDProject


In fact I would like to create a TCL/TK procedure which would be called
once (and only once) when you define the problem type, and which wouldn’t
appear every time you open a saved project.

Christophe Louis
----- Original Message -----
From: Enrique Escolano
To: gidlist at gatxan.cimne.upc.es
Sent: Friday, September 20, 2002 2:40 PM
Subject: Re: [GiDlist] InitGIDProject-LoadGIDProject


InitGIDProject is a event generated by loading the problemtype, the
argument provided is the
complete path of the directory .gid of this problem type

For example:
InitGIDProject C:/gid project/problemtypes/Test s/Vel Giro.gid

EndGIDProject is a event generated by unloading the problemtype.

LoadGIDProject is generated loading a model (also after load a problem
type), the argument is the
complete path name of the file of this model to contain specific
problemtype data (.spd extension)
For example:
LoadGIDProject C:/public/model.gid/model.spd

SaveGIDProject is generated if the user (or the automatic backup) save
the model, it is an oportunity to the problem data to save some specific
data in the spd file.

To test this events, use a WarnWinText command to show a debug message
For example, copy in ‘problemtype’.tcl this code:

proc InitGIDProject { dir } {
WarnWinText “InitGIDProject $dir”
}
proc InitGIDPostProcess {} {
WarnWinText “InitGIDPostProcess”
}
proc EndGIDProject {} {
WarnWinText “EndGIDProject. Falla si había cerrado esta ventana y
cargo otro problem type”
}

proc LoadGIDProject { filespd } {
WarnWinText “LoadGIDProject $filespd”
}

proc SaveGIDProject { filespd } {
WarnWinText “SaveGIDProject $filespd”
}

proc LoadResultsGIDPostProcess { file } {
WarnWinText “LoadResultsGIDPostProcess $file”
}

proc EndGIDPostProcess {} {
WarnWinText “EndGIDPostProcess”
}

proc BeforeWriteCalcFileGIDProject { file } {
WarnWinText “BeforeWriteCalcFileGIDProject $file”
}

proc AfterWriteCalcFileGIDProject { file errcode} {
WarnWinText “AfterWriteCalcFileGIDProject $file $errcode”
}

Is it not possible to avoid the call to InitGIDProject, but if you not
write a proc InitGIDProject, to make some action in response, this event is
ignorated.

Enrique
----- Original Message -----
From: Christophe Louis
To: Gid
Sent: Friday, September 20, 2002 12:37 PM
Subject: [GiDlist] InitGIDProject-LoadGIDProject


Hello,

I would like to know exactly when the InitGIDProject and the
LoadGIDProject procedures are called. Indeed, when I call DataProblem
Types…, the LoadGIDProject is also called, and when I open a saved file,
the InitGIDProject is called. Is it possible to avoid calling the
InitGIDProject procedure when the problem type is selected?

Christophe Louis
-------------- next part --------------
An HTML attachment was scrubbed…
URL: http://listas.cimne.upc.edu/pipermail/gidlist/attachments/20020923/1da8e94e/attachment.htm

If you read a model pertaining of a problem type, this problem type is also loaded, and the InitGIDProject event is raised

Store inside a global tcl variable a value to call your function only once.

proc InitGIDProject { dir } {
global MyProblemTypeVars
if { ![info exists MyProblemTypeVars(IsTheFisrtType)] || $MyProblemTypeVars(IsTheFisrtTime) == 0 } {
set MyProblemTypeVars(IsTheFisrtTime) 1
MyFunction
}
}

----- Original Message -----
From: Christophe Louis
To: gidlist at gatxan.cimne.upc.es
Sent: Friday, September 20, 2002 3:00 PM
Subject: Re: [GiDlist] InitGIDProject-LoadGIDProject


In fact I would like to create a TCL/TK procedure which would be called once (and only once) when you define the problem type, and which wouldn’t appear every time you open a saved project.

Christophe Louis
----- Original Message -----
From: Enrique Escolano
To: gidlist at gatxan.cimne.upc.es
Sent: Friday, September 20, 2002 2:40 PM
Subject: Re: [GiDlist] InitGIDProject-LoadGIDProject


InitGIDProject is a event generated by loading the problemtype, the argument provided is the
complete path of the directory .gid of this problem type

For example:
InitGIDProject C:/gid project/problemtypes/Test s/Vel Giro.gid

EndGIDProject is a event generated by unloading the problemtype.

LoadGIDProject is generated loading a model (also after load a problem type), the argument is the
complete path name of the file of this model to contain specific problemtype data (.spd extension)
For example:
LoadGIDProject C:/public/model.gid/model.spd

SaveGIDProject is generated if the user (or the automatic backup) save the model, it is an oportunity to the problem data to save some specific data in the spd file.

To test this events, use a WarnWinText command to show a debug message
For example, copy in ‘problemtype’.tcl this code:

proc InitGIDProject { dir } {
WarnWinText “InitGIDProject $dir”
}
proc InitGIDPostProcess {} {
WarnWinText “InitGIDPostProcess”
}
proc EndGIDProject {} {
WarnWinText “EndGIDProject. Falla si había cerrado esta ventana y cargo otro problem type”
}

proc LoadGIDProject { filespd } {
WarnWinText “LoadGIDProject $filespd”
}

proc SaveGIDProject { filespd } {
WarnWinText “SaveGIDProject $filespd”
}

proc LoadResultsGIDPostProcess { file } {
WarnWinText “LoadResultsGIDPostProcess $file”
}

proc EndGIDPostProcess {} {
WarnWinText “EndGIDPostProcess”
}

proc BeforeWriteCalcFileGIDProject { file } {
WarnWinText “BeforeWriteCalcFileGIDProject $file”
}

proc AfterWriteCalcFileGIDProject { file errcode} {
WarnWinText “AfterWriteCalcFileGIDProject $file $errcode”
}

Is it not possible to avoid the call to InitGIDProject, but if you not write a proc InitGIDProject, to make some action in response, this event is ignorated.

Enrique
----- Original Message -----
From: Christophe Louis
To: Gid
Sent: Friday, September 20, 2002 12:37 PM
Subject: [GiDlist] InitGIDProject-LoadGIDProject


Hello,

I would like to know exactly when the InitGIDProject and the LoadGIDProject procedures are called. Indeed, when I call DataProblem Types…, the LoadGIDProject is also called, and when I open a saved file, the InitGIDProject is called. Is it possible to avoid calling the InitGIDProject procedure when the problem type is selected?

Christophe Louis
-------------- next part --------------
An HTML attachment was scrubbed…
URL: http://listas.cimne.upc.edu/pipermail/gidlist/attachments/20020925/29ac40e2/attachment.htm

Hi Enrique and all
Continue to ask about the following question:
Please advice the #MAT#(‘BookName’)option.
When we use this option how we write the bas file out?

in my .mat file I seperated as your advice, which is
before I had more than 100 fields. I now have
Material Properties and Geometry Properties. Now
how to write the Material properties out??in bas file
by using #MAT# option. Hope you got my point.

Best regards.

\


Do you Yahoo!?
New DSL Internet Access from SBC & Yahoo!

If you use for example as a field of a material (book Geometry) a field with another material (book Material)
QUESTION:Composition_Material#MAT#(Material)
VALUE:AISI_4340_STEEL

Then, in the bas file, the name of the selected material is obtained with *MatProp
*matprop(Composition_Material)
The number of this material is obtained with *matnum(matprop(Composition_Material))
for example:

*loop materials
*set var MID=matnum(matprop(Composition_Material))
*set var PID=matnum()
Geometry material num=*PID Compition Material number=*MID
*end materials

Download the problemtype Nastran to see a god sample with #MAT# fields
(download directly from the menu Data-Problem Type-Internet Retrieve, Retrieve list)

Enrique

----- Original Message -----
From: “VSayako Willy” vilaysako at yahoo.com
To: gidlist at gatxan.cimne.upc.es
Sent: Wednesday, September 25, 2002 11:29 AM
Subject: [GiDlist] How to write data out for #MAT#(‘BookName’) Option in .bas file


Hi Enrique and all
Continue to ask about the following question:
Please advice the #MAT#(‘BookName’)option.
When we use this option how we write the bas file out?
in my .mat file I seperated as your advice, which is
before I had more than 100 fields. I now have
Material Properties and Geometry Properties. Now
how to write the Material properties out??in bas file
by using #MAT# option. Hope you got my point.
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/20020925/17391842/attachment.htm

Hi Enrique
Thanks for your reply. I got your point but what I
need to write out is the fields in the material name,
for example.
in my mat file:
BOOK:Material_Properties
NUMBER:1 MATERIAL:ISO~PLASTIC
QUESTION:Young_Modulus_E
VALUE:1e4
QUESTION:Poisson_ratio
VALUE:0.3

END MATERIAL
NUMBER:2 MATERIAL:COMPOSITE
QUESTION:Young_Modulus_Ex
VALUE:1e6
QUESTION:Poisson_ratio_vx
VALUE:0.33

END MATERIAL
BOOK:Geometry_Properties
NUMBER:3 MATERIAL:Element_Thickness
QUESTION:Thickness
VALUE:0.1
QUESTION:Assigned_Material#MAT#(Material_Properties)
VALUE:ISOTROPIC
END MATERIAL

and in my data file I want to list the fields as
follows:
ISOTROPIC CASE:
Young_Modulus_E Poisson_ratio thickness

COMPOSITE CASE:
Young_Modulus_Ex Poisson_ratio_vx thicness

I tried to write out as usual way but fields in Book
Material Properties are not regconized.

Regards






— Enrique Escolano escolano at cimne.upc.es wrote:
If you use for example as a field of a material
(book Geometry) a field with another material (book
Material)
QUESTION:Composition_Material#MAT#(Material)
VALUE:AISI_4340_STEEL
Then, in the bas file, the name of the selected
material is obtained with *MatProp
*matprop(Composition_Material)
The number of this material is obtained with
*matnum(matprop(Composition_Material))
for example:
*loop materials
*set var MID=matnum(matprop(Composition_Material))
*set var PID=matnum()
Geometry material num=*PID Compition Material
number=*MID
*end materials
Download the problemtype Nastran to see a god sample
with #MAT# fields
(download directly from the menu Data-Problem
Type-Internet Retrieve, Retrieve list)
Enrique
----- Original Message -----
From: “VSayako Willy” vilaysako at yahoo.com
To: gidlist at gatxan.cimne.upc.es
Sent: Wednesday, September 25, 2002 11:29 AM
Subject: [GiDlist] How to write data out for
#MAT#(‘BookName’) Option in .bas file

Hi Enrique and all
Continue to ask about the following question:
Please advice the #MAT#(‘BookName’)option.
When we use this option how we write the bas file
out?
in my .mat file I seperated as your advice, which
is
before I had more than 100 fields. I now have
Material Properties and Geometry Properties.
Now
how to write the Material properties out??in bas
file
by using #MAT# option. Hope you got my point.
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!?
New DSL Internet Access from SBC & Yahoo!

This is a sample (also attached) to inquire the fields of a material from the bas file with a *tcl command

Copy this tcl procedure inside the file “problemtypename”.tcl

proc WriteMatFields { matname } {
set ret “”
set fields [.central.s info material $matname]
set n [lindex $fields 0]
for { set i 0 } { $i $n } { incr i } {
append ret [lindex $fields [expr $i2+1]]
append ret " "
append ret [lindex $fields [expr $i
2+2]]
append ret “\n”
}
return $ret
}

To call from the “problemtypename”.bas file use *tcl(order_tcl parameter) :

  • USED MATERIALS -
    *loop materials
    [*MatProp(0)]
    *tcl(WriteMatFields *MatProp(0))

*end materials

  • UNUSED MATERIALS -
    *loop materials *NotUsed
    [*MatProp(0)]
    *tcl(WriteMatFields *MatProp(0))

*end materials

For more info about the standard tcl languaje, visit http://tcl.activestate.com
For more info about specific GiD tcl commands, see Help-TCL-TK Extension

Enrique Escolano

----- Original Message -----
From: “VSayako Willy” vilaysako at yahoo.com
To: gidlist at gatxan.cimne.upc.es
Sent: Thursday, September 26, 2002 4:08 AM
Subject: [GiDlist] Still..How to write data out for #MAT#(‘BookName’) Option in .bas file


Hi Enrique
Thanks for your reply. I got your point but what I
need to write out is the fields in the material name,
for example.
in my mat file:
BOOK:Material_Properties
NUMBER:1 MATERIAL:ISO~PLASTIC
QUESTION:Young_Modulus_E
VALUE:1e4
QUESTION:Poisson_ratio
VALUE:0.3

END MATERIAL
NUMBER:2 MATERIAL:COMPOSITE
QUESTION:Young_Modulus_Ex
VALUE:1e6
QUESTION:Poisson_ratio_vx
VALUE:0.33

END MATERIAL
BOOK:Geometry_Properties
NUMBER:3 MATERIAL:Element_Thickness
QUESTION:Thickness
VALUE:0.1
QUESTION:Assigned_Material#MAT#(Material_Properties)
VALUE:ISOTROPIC
END MATERIAL
---------------------------------------
and in my data file I want to list the fields as
follows:
ISOTROPIC CASE:
Young_Modulus_E Poisson_ratio thickness

COMPOSITE CASE:
Young_Modulus_Ex Poisson_ratio_vx thicness

I tried to write out as usual way but fields in Book
Material Properties are not regconized.
Regards





— Enrique Escolano escolano at cimne.upc.es wrote:
If you use for example as a field of a material
(book Geometry) a field with another material (book
Material)
QUESTION:Composition_Material#MAT#(Material)
VALUE:AISI_4340_STEEL
Then, in the bas file, the name of the selected
material is obtained with *MatProp
*matprop(Composition_Material)
The number of this material is obtained with
*matnum(matprop(Composition_Material))
for example:
*loop materials
*set var MID=matnum(matprop(Composition_Material))
*set var PID=matnum()
Geometry material num=*PID Compition Material
number=*MID
*end materials
Download the problemtype Nastran to see a god sample
with #MAT# fields
(download directly from the menu Data-Problem
Type-Internet Retrieve, Retrieve list)
Enrique
----- Original Message -----
From: “VSayako Willy” vilaysako at yahoo.com
To: gidlist at gatxan.cimne.upc.es
Sent: Wednesday, September 25, 2002 11:29 AM
Subject: [GiDlist] How to write data out for
#MAT#(‘BookName’) Option in .bas file

Hi Enrique and all
Continue to ask about the following question:
Please advice the #MAT#(‘BookName’)option.
When we use this option how we write the bas file
out?
in my .mat file I seperated as your advice, which
is
before I had more than 100 fields. I now have
Material Properties and Geometry Properties.
Now
how to write the Material properties out??in bas
file
by using #MAT# option. Hope you got my point.
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!?
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/20020926/951e66d4/attachment.htm
-------------- next part --------------
A non-text attachment was scrubbed…
Name: SampleTclMatFields.gid.zip
Type: application/x-zip-compressed
Size: 940 bytes
Desc: not available
Url : http://listas.cimne.upc.edu/pipermail/gidlist/attachments/20020926/951e66d4/attachment.bin

Hi Enrique
Many thanks for your advice.For USING WITH THE ID
defining the type of material or property is very good
IDEAS.I have tried to work it out. Actually, in my
case I have Material Property and Geometry
Property in one file,(Mat file), same as in Nastran.
In Nastran the Material Property is not to be
assigned(I don’t know also how you worked it out and
how we can get the mat prop in data file). In my case
when I put the values of the material in the field
boxes then GiD ask to assign then I assigned. Then I
go for Geometry Property did the same way, select
and assign. Then write the data file out. The fields
in Material Property were not written out but only
the fields in Geometry Property. I realized that GiD
recognizes only the last assignment in Mat file. What
I did now is like that: Copy the whole fields in
Material property to the Geometry property and make
both property as one Material then it works with no
problem, but it seems idiot because I have to repeat
the same material again and again.

Gif files

In my mat file I included a lot of IMAGE:***.gif. Now
I would like to have those gif file in seperate
folder. How should we write in problemtype.tcl to
control those gif files?? I looked at those examples
attached with GiD.7 but still could not figure out.

Thanks so much again

Best regards

— Enrique Escolano escolano at cimne.upc.es wrote:
This is a sample (also attached) to inquire the
fields of a material from the bas file with a *tcl
command
Copy this tcl procedure inside the file
“problemtypename”.tcl
proc WriteMatFields { matname } {
set ret “”
set fields [.central.s info material $matname]
set n [lindex $fields 0]
for { set i 0 } { $i $n } { incr i } {
append ret [lindex $fields [expr $i*2+1]]
append ret " "
append ret [lindex $fields [expr $i*2+2]]
append ret “\n”
}
return $ret
}
To call from the “problemtypename”.bas file use
*tcl(order_tcl parameter) :
- USED MATERIALS -
*loop materials
[*MatProp(0)]
*tcl(WriteMatFields *MatProp(0))
*end materials
- UNUSED MATERIALS -
*loop materials *NotUsed
[*MatProp(0)]
*tcl(WriteMatFields *MatProp(0))
*end materials
For more info about the standard tcl languaje, visit
http://tcl.activestate.com
For more info about specific GiD tcl commands, see
Help-TCL-TK Extension
Enrique Escolano
----- Original Message -----
From: “VSayako Willy” vilaysako at yahoo.com
To: gidlist at gatxan.cimne.upc.es
Sent: Thursday, September 26, 2002 4:08 AM
Subject: [GiDlist] Still..How to write data out for
#MAT#(‘BookName’) Option in .bas file

Hi Enrique
Thanks for your reply. I got your point but
what I
need to write out is the fields in the material
name,
for example.
in my mat file:
BOOK:Material_Properties
NUMBER:1 MATERIAL:ISO~PLASTIC
QUESTION:Young_Modulus_E
VALUE:1e4
QUESTION:Poisson_ratio
VALUE:0.3

END MATERIAL
NUMBER:2 MATERIAL:COMPOSITE
QUESTION:Young_Modulus_Ex
VALUE:1e6
QUESTION:Poisson_ratio_vx
VALUE:0.33

END MATERIAL
BOOK:Geometry_Properties
NUMBER:3 MATERIAL:Element_Thickness
QUESTION:Thickness
VALUE:0.1
QUESTION:Assigned_Material#MAT#(Material_Properties)
VALUE:ISOTROPIC
END MATERIAL
---------------------------------------
and in my data file I want to list the fields as
follows:
ISOTROPIC CASE:
Young_Modulus_E Poisson_ratio thickness

COMPOSITE CASE:
Young_Modulus_Ex Poisson_ratio_vx thicness

I tried to write out as usual way but fields in
Book
Material Properties are not regconized.
Regards







— Enrique Escolano escolano at cimne.upc.es
wrote:
If you use for example as a field of a material
(book Geometry) a field with another material
(book
Material)
QUESTION:Composition_Material#MAT#(Material)
VALUE:AISI_4340_STEEL
Then, in the bas file, the name of the selected
material is obtained with *MatProp
*matprop(Composition_Material)
The number of this material is obtained with
*matnum(matprop(Composition_Material))
for example:
*loop materials
*set var
MID=matnum(matprop(Composition_Material))
*set var PID=matnum()
Geometry material num=*PID Compition Material
number=*MID
*end materials
Download the problemtype Nastran to see a god
sample
with #MAT# fields
(download directly from the menu Data-Problem
Type-Internet Retrieve, Retrieve list)
Enrique
----- Original Message -----
From: “VSayako Willy” vilaysako at yahoo.com
To: gidlist at gatxan.cimne.upc.es
Sent: Wednesday, September 25, 2002 11:29 AM
Subject: [GiDlist] How to write data out for
#MAT#(‘BookName’) Option in .bas file

Hi Enrique and all
Continue to ask about the following
question:
Please advice the #MAT#(‘BookName’)option.
When we use this option how we write the bas
file
out?
in my .mat file I seperated as your advice,
which
is
before I had more than 100 fields. I now have
Material Properties and Geometry
Properties.
Now
how to write the Material properties out??in
bas
file
by using #MAT# option. Hope you got my point.
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!?
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_


ATTACHMENT part 2 application/x-zip-compressed
name=SampleTclMatFields.gid.zip


\


Do you Yahoo!?
New DSL Internet Access from SBC & Yahoo!

Hi,

At the moment in GiD it is only possible assigns one material to every
geometric entity, it means that if you assign more than one material to a
geometric entity, GiD only takes care of the last one.
I know two possible solutions for your question:

1- Using #MAT#(Book Name) command, with this command is possible
create links between different materials. In your case you have to divide
your mat file in two books: material properties and geometry properties and
only allow to the user assign one of them. You can take a look to
Nastran-Interface like an example.

2- Defining your materials likes conditions; in this case you can
assign so many materials as you want to any geometric entity. The problem
associated to this option is that you cannot save the materials parameters.
To solve this problem you can use the tcl-tk extension of GiD to create some
kind of file to save the values of the material. You can take a look to
Ram-Series (Steel sections window) like an example.

I hope this information can help you

Best Regards

Aleix Valls ( Nastran-Interface developer)


Compass Ing. y Sistemas Aleix Valls
http://www.compassis.com aleix at compassis.com
c/ Manuel Girona, 61 bajos tel. +34 93 204 10 82
08034 Barcelona, Spain fax. +34 93 204 19 09

----- Original Message -----
From: “VSayako Willy” vilaysako at yahoo.com
To: gidlist at gatxan.cimne.upc.es
Sent: Friday, September 27, 2002 5:07 AM
Subject: [GiDlist] Material, Property and .gif files in mat file


Hi Enrique
Many thanks for your advice.For USING WITH THE ID
defining the type of material or property is very good
IDEAS.I have tried to work it out. Actually, in my
case I have Material Property and Geometry
Property in one file,(Mat file), same as in Nastran.
In Nastran the Material Property is not to be
assigned(I don’t know also how you worked it out and
how we can get the mat prop in data file). In my case
when I put the values of the material in the field
boxes then GiD ask to assign then I assigned. Then I
go for Geometry Property did the same way, select
and assign. Then write the data file out. The fields
in Material Property were not written out but only
the fields in Geometry Property. I realized that GiD
recognizes only the last assignment in Mat file. What
I did now is like that: Copy the whole fields in
Material property to the Geometry property and make
both property as one Material then it works with no
problem, but it seems idiot because I have to repeat
the same material again and again.
--------------
Gif files
--------------
In my mat file I included a lot of IMAGE:***.gif. Now
I would like to have those gif file in seperate
folder. How should we write in problemtype.tcl to
control those gif files?? I looked at those examples
attached with GiD.7 but still could not figure out.
--------------
Thanks so much again
Best regards
— Enrique Escolano escolano at cimne.upc.es wrote:
This is a sample (also attached) to inquire the
fields of a material from the bas file with a *tcl
command
Copy this tcl procedure inside the file
“problemtypename”.tcl
proc WriteMatFields { matname } {
set ret “”
set fields [.central.s info material $matname]
set n [lindex $fields 0]
for { set i 0 } { $i $n } { incr i } {
append ret [lindex $fields [expr $i*2+1]]
append ret " "
append ret [lindex $fields [expr $i*2+2]]
append ret “\n”
}
return $ret
}
To call from the “problemtypename”.bas file use
*tcl(order_tcl parameter) :
- USED MATERIALS -
*loop materials
[*MatProp(0)]
*tcl(WriteMatFields *MatProp(0))
*end materials
- UNUSED MATERIALS -
*loop materials *NotUsed
[*MatProp(0)]
*tcl(WriteMatFields *MatProp(0))
*end materials
For more info about the standard tcl languaje, visit
http://tcl.activestate.com
For more info about specific GiD tcl commands, see
Help-TCL-TK Extension
Enrique Escolano
----- Original Message -----
From: “VSayako Willy” vilaysako at yahoo.com
To: gidlist at gatxan.cimne.upc.es
Sent: Thursday, September 26, 2002 4:08 AM
Subject: [GiDlist] Still..How to write data out for
#MAT#(‘BookName’) Option in .bas file

Hi Enrique
Thanks for your reply. I got your point but
what I
need to write out is the fields in the material
name,
for example.
in my mat file:
BOOK:Material_Properties
NUMBER:1 MATERIAL:ISO~PLASTIC
QUESTION:Young_Modulus_E
VALUE:1e4
QUESTION:Poisson_ratio
VALUE:0.3

END MATERIAL
NUMBER:2 MATERIAL:COMPOSITE
QUESTION:Young_Modulus_Ex
VALUE:1e6
QUESTION:Poisson_ratio_vx
VALUE:0.33

END MATERIAL
BOOK:Geometry_Properties
NUMBER:3 MATERIAL:Element_Thickness
QUESTION:Thickness
VALUE:0.1
QUESTION:Assigned_Material#MAT#(Material_Properties)
VALUE:ISOTROPIC
END MATERIAL
---------------------------------------
and in my data file I want to list the fields as
follows:
ISOTROPIC CASE:
Young_Modulus_E Poisson_ratio thickness

COMPOSITE CASE:
Young_Modulus_Ex Poisson_ratio_vx thicness

I tried to write out as usual way but fields in
Book
Material Properties are not regconized.
Regards







— Enrique Escolano escolano at cimne.upc.es
wrote:
If you use for example as a field of a material
(book Geometry) a field with another material
(book
Material)
QUESTION:Composition_Material#MAT#(Material)
VALUE:AISI_4340_STEEL
Then, in the bas file, the name of the selected
material is obtained with *MatProp
*matprop(Composition_Material)
The number of this material is obtained with
*matnum(matprop(Composition_Material))
for example:
*loop materials
*set var
MID=matnum(matprop(Composition_Material))
*set var PID=matnum()
Geometry material num=*PID Compition Material
number=*MID
*end materials
Download the problemtype Nastran to see a god
sample
with #MAT# fields
(download directly from the menu Data-Problem
Type-Internet Retrieve, Retrieve list)
Enrique
----- Original Message -----
From: “VSayako Willy” vilaysako at yahoo.com
To: gidlist at gatxan.cimne.upc.es
Sent: Wednesday, September 25, 2002 11:29 AM
Subject: [GiDlist] How to write data out for
#MAT#(‘BookName’) Option in .bas file

Hi Enrique and all
Continue to ask about the following
question:
Please advice the #MAT#(‘BookName’)option.
When we use this option how we write the bas
file
out?
in my .mat file I seperated as your advice,
which
is
before I had more than 100 fields. I now have
Material Properties and Geometry
Properties.
Now
how to write the Material properties out??in
bas
file
by using #MAT# option. Hope you got my point.
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!?
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_


ATTACHMENT part 2 application/x-zip-compressed
name=SampleTclMatFields.gid.zip

\


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_

Hi Enrique and Aleix
Thanks so much for your advice. I think the option
to put the material as a condition is also good idea
but in my case I only need to write the material
properties in one single line, not to every element
assigned, I think you know what I mean. To write in
condition all fields should be repeated over loop
elements right then all the fields of material have to
be written out as same number as element assigned.For
example, in bas file:

*set Cond Material_Properties
*loop elems *OnlyIncond
*Cond(Young_Modulus_E,real) *Cond(Poisson_ratio,real)
*end elems

if I assign to 10 elements then the Young_Modulus_E
and Poisson_ratio will be written out 10 times.
How can I get only one line (1 time) of
Material_Properties written out?? I think in this case
we have to set sum of count with *if condition?

Gif files
In my ProblemType.gid directory there are more than 10
Gif files used in mat file by command
IMAGE:‘FigureName’.gif. Now I create the directory
under problemType.gid Dir and put all the gif files in
that. But GiD didn’t recognize those files. I know
that we should write something in problemType.tcl file
to control it but didn’t know how? I looked over those
Ramshell and Nastran and whatever you included with
GiD but still not clear.
It would be great if you put more online information
about Advanced GiD. To work with pure Tcl/Tk is not a
problem but to combine or interface the Tcl/Tk with
GiD and its components is still confused. Please give
more examples to expose those problems.


With my best regards..






— Aleix Valls aleix at compassis.com wrote:
Hi,
At the moment in GiD it is only possible assigns one
material to every
geometric entity, it means that if you assign more
than one material to a
geometric entity, GiD only takes care of the last
one.
I know two possible solutions for your question:
1- Using #MAT#(Book Name) command, with this
command is possible
create links between different materials. In your
case you have to divide
your mat file in two books: material properties and
geometry properties and
only allow to the user assign one of them. You can
take a look to
Nastran-Interface like an example.
2- Defining your materials likes conditions;
in this case you can
assign so many materials as you want to any
geometric entity. The problem
associated to this option is that you cannot save
the materials parameters.
To solve this problem you can use the tcl-tk
extension of GiD to create some
kind of file to save the values of the material. You
can take a look to
Ram-Series (Steel sections window) like an example.
I hope this information can help you
Best Regards
Aleix Valls ( Nastran-Interface developer)
-----------------
Compass Ing. y Sistemas Aleix Valls
http://www.compassis.com aleix at compassis.com
c/ Manuel Girona, 61 bajos tel. +34 93 204 10
82
08034 Barcelona, Spain fax. +34 93 204 19
09
----- Original Message -----
From: “VSayako Willy” vilaysako at yahoo.com
To: gidlist at gatxan.cimne.upc.es
Sent: Friday, September 27, 2002 5:07 AM
Subject: [GiDlist] Material, Property and .gif files
in mat file

Hi Enrique
Many thanks for your advice.For USING WITH THE
ID
defining the type of material or property is very
good
IDEAS.I have tried to work it out. Actually, in my
case I have Material Property and Geometry
Property in one file,(Mat file), same as in
Nastran.
In Nastran the Material Property is not to be
assigned(I don’t know also how you worked it out
and
how we can get the mat prop in data file). In my
case
when I put the values of the material in the field
boxes then GiD ask to assign then I assigned. Then
I
go for Geometry Property did the same way,
select
and assign. Then write the data file out. The
fields
in Material Property were not written out but
only
the fields in Geometry Property. I realized that
GiD
recognizes only the last assignment in Mat file.
What
I did now is like that: Copy the whole fields in
Material property to the Geometry property and
make
both property as one Material then it works with
no
problem, but it seems idiot because I have to
repeat
the same material again and again.
--------------
Gif files
--------------
In my mat file I included a lot of IMAGE:***.gif.
Now
I would like to have those gif file in seperate
folder. How should we write in problemtype.tcl to
control those gif files?? I looked at those
examples
attached with GiD.7 but still could not figure
out.
--------------
Thanks so much again
Best regards


— Enrique Escolano escolano at cimne.upc.es
wrote:
This is a sample (also attached) to inquire the
fields of a material from the bas file with a
*tcl
command
Copy this tcl procedure inside the file
“problemtypename”.tcl
proc WriteMatFields { matname } {
set ret “”
set fields [.central.s info material $matname]
set n [lindex $fields 0]
for { set i 0 } { $i $n } { incr i } {
append ret [lindex $fields [expr $i*2+1]]
append ret " "
append ret [lindex $fields [expr $i*2+2]]
append ret “\n”
}
return $ret
}
To call from the “problemtypename”.bas file use
*tcl(order_tcl parameter) :
- USED MATERIALS -
*loop materials
[*MatProp(0)]
*tcl(WriteMatFields *MatProp(0))
*end materials
- UNUSED MATERIALS -
*loop materials *NotUsed
[*MatProp(0)]
*tcl(WriteMatFields *MatProp(0))
*end materials
For more info about the standard tcl languaje,
visit
http://tcl.activestate.com
For more info about specific GiD tcl commands,
see
Help-TCL-TK Extension
Enrique Escolano
----- Original Message -----
From: “VSayako Willy” vilaysako at yahoo.com
To: gidlist at gatxan.cimne.upc.es
Sent: Thursday, September 26, 2002 4:08 AM
Subject: [GiDlist] Still..How to write data out
for
#MAT#(‘BookName’) Option in .bas file

Hi Enrique
Thanks for your reply. I got your point but
what I
need to write out is the fields in the
material
name,
for example.
in my mat file:
BOOK:Material_Properties
NUMBER:1 MATERIAL:ISO~PLASTIC
QUESTION:Young_Modulus_E
VALUE:1e4
QUESTION:Poisson_ratio
VALUE:0.3

END MATERIAL
NUMBER:2 MATERIAL:COMPOSITE
QUESTION:Young_Modulus_Ex
VALUE:1e6
QUESTION:Poisson_ratio_vx
VALUE:0.33

END MATERIAL
BOOK:Geometry_Properties
NUMBER:3 MATERIAL:Element_Thickness
QUESTION:Thickness
VALUE:0.1

QUESTION:Assigned_Material#MAT#(Material_Properties)
VALUE:ISOTROPIC
END MATERIAL
---------------------------------------
and in my data file I want to list the fields
as
follows:
=== message truncated ===

\


Do you Yahoo!?
New DSL Internet Access from SBC & Yahoo!

  1. You can use a break inside the loop to write only once.

*set Cond Material_Properties
*loop elems *OnlyIncond
*Cond(Young_Modulus_E,real) *Cond(Poisson_ratio,real)
*break
*end elems

  1. It seems some bug of GiD, packing the pictures of the special field image: “imgname”.gif
    (depending of the window size, only a brief splash of the image is showed).


    ----- Original Message -----
    From: “VSayako Willy” vilaysako at yahoo.com
    To: gidlist at gatxan.cimne.upc.es
    Sent: Sunday, September 29, 2002 5:25 AM
    Subject: [GiDlist] Material, Property and .gif files in mat file


    Hi Enrique and Aleix
    Thanks so much for your advice. I think the option
    to put the material as a condition is also good idea
    but in my case I only need to write the material
    properties in one single line, not to every element
    assigned, I think you know what I mean. To write in
    condition all fields should be repeated over loop
    elements right then all the fields of material have to
    be written out as same number as element assigned.For
    example, in bas file:
    --------------------------------
    *set Cond Material_Properties
    *loop elems *OnlyIncond
    *Cond(Young_Modulus_E,real) *Cond(Poisson_ratio,real)
    *end elems
    --------------------------------
    if I assign to 10 elements then the Young_Modulus_E
    and Poisson_ratio will be written out 10 times.
    How can I get only one line (1 time) of
    Material_Properties written out?? I think in this case
    we have to set sum of count with *if condition?
    --------------------------------
    Gif files
    In my ProblemType.gid directory there are more than 10
    Gif files used in mat file by command
    IMAGE:‘FigureName’.gif. Now I create the directory
    under problemType.gid Dir and put all the gif files in
    that. But GiD didn’t recognize those files. I know
    that we should write something in problemType.tcl file
    to control it but didn’t know how? I looked over those
    Ramshell and Nastran and whatever you included with
    GiD but still not clear.
    It would be great if you put more online information
    about Advanced GiD. To work with pure Tcl/Tk is not a
    problem but to combine or interface the Tcl/Tk with
    GiD and its components is still confused. Please give
    more examples to expose those problems.

With my best regards..





— Aleix Valls aleix at compassis.com wrote:
Hi,
At the moment in GiD it is only possible assigns one
material to every
geometric entity, it means that if you assign more
than one material to a
geometric entity, GiD only takes care of the last
one.
I know two possible solutions for your question:
1- Using #MAT#(Book Name) command, with this
command is possible
create links between different materials. In your
case you have to divide
your mat file in two books: material properties and
geometry properties and
only allow to the user assign one of them. You can
take a look to
Nastran-Interface like an example.
2- Defining your materials likes conditions;
in this case you can
assign so many materials as you want to any
geometric entity. The problem
associated to this option is that you cannot save
the materials parameters.
To solve this problem you can use the tcl-tk
extension of GiD to create some
kind of file to save the values of the material. You
can take a look to
Ram-Series (Steel sections window) like an example.
I hope this information can help you
Best Regards
Aleix Valls ( Nastran-Interface developer)
-----------------
Compass Ing. y Sistemas Aleix Valls
http://www.compassis.com aleix at compassis.com
c/ Manuel Girona, 61 bajos tel. +34 93 204 10
82
08034 Barcelona, Spain fax. +34 93 204 19
09
----- Original Message -----
From: “VSayako Willy” vilaysako at yahoo.com
To: gidlist at gatxan.cimne.upc.es
Sent: Friday, September 27, 2002 5:07 AM
Subject: [GiDlist] Material, Property and .gif files
in mat file

Hi Enrique
Many thanks for your advice.For USING WITH THE
ID
defining the type of material or property is very
good
IDEAS.I have tried to work it out. Actually, in my
case I have Material Property and Geometry
Property in one file,(Mat file), same as in
Nastran.
In Nastran the Material Property is not to be
assigned(I don’t know also how you worked it out
and
how we can get the mat prop in data file). In my
case
when I put the values of the material in the field
boxes then GiD ask to assign then I assigned. Then
I
go for Geometry Property did the same way,
select
and assign. Then write the data file out. The
fields
in Material Property were not written out but
only
the fields in Geometry Property. I realized that
GiD
recognizes only the last assignment in Mat file.
What
I did now is like that: Copy the whole fields in
Material property to the Geometry property and
make
both property as one Material then it works with
no
problem, but it seems idiot because I have to
repeat
the same material again and again.
--------------
Gif files
--------------
In my mat file I included a lot of IMAGE:***.gif.
Now
I would like to have those gif file in seperate
folder. How should we write in problemtype.tcl to
control those gif files?? I looked at those
examples
attached with GiD.7 but still could not figure
out.
--------------
Thanks so much again
Best regards


— Enrique Escolano escolano at cimne.upc.es
wrote:
This is a sample (also attached) to inquire the
fields of a material from the bas file with a
*tcl
command
Copy this tcl procedure inside the file
“problemtypename”.tcl
proc WriteMatFields { matname } {
set ret “”
set fields [.central.s info material $matname]
set n [lindex $fields 0]
for { set i 0 } { $i $n } { incr i } {
append ret [lindex $fields [expr $i*2+1]]
append ret " "
append ret [lindex $fields [expr $i*2+2]]
append ret “\n”
}
return $ret
}
To call from the “problemtypename”.bas file use
*tcl(order_tcl parameter) :
- USED MATERIALS -
*loop materials
[*MatProp(0)]
*tcl(WriteMatFields *MatProp(0))
*end materials
- UNUSED MATERIALS -
*loop materials *NotUsed
[*MatProp(0)]
*tcl(WriteMatFields *MatProp(0))
*end materials
For more info about the standard tcl languaje,
visit
http://tcl.activestate.com
For more info about specific GiD tcl commands,
see
Help-TCL-TK Extension
Enrique Escolano
----- Original Message -----
From: “VSayako Willy” vilaysako at yahoo.com
To: gidlist at gatxan.cimne.upc.es
Sent: Thursday, September 26, 2002 4:08 AM
Subject: [GiDlist] Still..How to write data out
for
#MAT#(‘BookName’) Option in .bas file

Hi Enrique
Thanks for your reply. I got your point but
what I
need to write out is the fields in the
material
name,
for example.
in my mat file:
BOOK:Material_Properties
NUMBER:1 MATERIAL:ISO~PLASTIC
QUESTION:Young_Modulus_E
VALUE:1e4
QUESTION:Poisson_ratio
VALUE:0.3

END MATERIAL
NUMBER:2 MATERIAL:COMPOSITE
QUESTION:Young_Modulus_Ex
VALUE:1e6
QUESTION:Poisson_ratio_vx
VALUE:0.33

END MATERIAL
BOOK:Geometry_Properties
NUMBER:3 MATERIAL:Element_Thickness
QUESTION:Thickness
VALUE:0.1

QUESTION:Assigned_Material#MAT#(Material_Properties)
VALUE:ISOTROPIC
END MATERIAL
---------------------------------------
and in my data file I want to list the fields
as
follows:
=== message truncated ===


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/20020930/879ff33f/attachment.htm

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!

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

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

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

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/

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_

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