# \[GiDlist\] Invoking and editing tcl macros

**URL:** <https://forum.gidsimulation.com/t/gidlist-invoking-and-editing-tcl-macros/1863>\
**Category:** 2014\
**Created:** [October 9, 2014, 5:24pm UTC](https://forum.gidsimulation.com/t/gidlist-invoking-and-editing-tcl-macros/1863 "2014-10-09T17:24:19Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![Dhankhar\_Amit\_Kumar](https://forum.gidsimulation.com/letter_avatar_proxy/v4/letter/d/c2a13f/32.png) [@Dhankhar\_Amit\_Kumar](https://forum.gidsimulation.com/u/Dhankhar_Amit_Kumar)\
**Post date:** [October 9, 2014, 5:24pm UTC](https://forum.gidsimulation.com/t/gidlist-invoking-and-editing-tcl-macros/1863/1 "2014-10-09T17:24:19Z")

</div>

Hi,

Just a small follow up question- Which version of GID are you running? When I click the ‘Edit Macro’ button, I just see the macros listed and not the actual code. Could you let me know how can I can enable this so that I am able to edit any of the inbuilt tcl macros? Attached the screenshot of what I got.  
  
  
  
Thanks  
  
  
Today’s Topics:

1. Re: GID move node feature? (Enrique Escolano)  
  
\

* * *

Message: 1  
Date: Tue, 7 Oct 2014 14:49:26 +0200  
From: “Enrique Escolano” [escolano at cimne.upc.edu](http://listas.cimne.upc.edu/cgi-bin/mailman/listinfo/gidlist)  
Subject: Re: [GiDlist] GID move node feature?  
To: [gidlist at listas.cimne.upc.edu](http://listas.cimne.upc.edu/cgi-bin/mailman/listinfo/gidlist)  
Message-ID: 097e01cfe22d$20aa6f80$61ff4e80$@cimne.upc.edu  
Content-Type: text/plain; charset=“us-ascii”

You can move a mesh node for example as you said, from the menu

Mesh-Edit mesh-Move node

And then pick the node and enter its new x,y,z coordinates in the lower  
command line  
  
  
  
That internally is converted into this GiD process commands:  
  
  
  
MEscape Meshing EditMesh MoveNode $node\_id $x,$y,$z Escape  
  
  
  
Where node\_id is the node number, and x y z the new location  
  
  
  
And it exists also a more direct GiD-Tcl command:

GiD\_Mesh edit node $node\_id {$x $y $z}  
  
  
  
You can create a Tcl procedure to set the quadratic node position you want  
for all mesh nodes, and you can invoke this procedure in multiple ways

e.g. writing in the lower command line preceded by -np- your\_procedure  
(-np- mean ‘no process’ and then the next is expected to be a Tcl command)

of from a button of the ‘macros toolbar’  
  
  
  
In fact It already exists (hidden in the toolbar) a macro button very  
similar, to re-locate the quadratic nodes aligned in the middle edge (e.g.  
to avoid possible wrong jacobians in curved elements)  
  
  
  
Have a look to the Tcl code of this macro: click the “Edit macros” button to  
open the Macros window  
  
  
  
  
  
And select the ‘Align Quadratic Nodes’ macro to see its Tcl code on the  
right  
  
  
  
  
  
  
  
_From the window could set this macro visible in the toolbar or invoke it._  
  
  
You can clone this macro to create your similar macro changing a little the  
Tcl code to calculate the position you want instead of the mid-edge  
  
  
  
Enrique  
  
  
  
  
  
  
  
De: [gidlist-bounces at listas.cimne.upc.edu](http://listas.cimne.upc.edu/cgi-bin/mailman/listinfo/gidlist)  
[mailto:[gidlist-bounces at listas.cimne.upc.edu](http://listas.cimne.upc.edu/cgi-bin/mailman/listinfo/gidlist)] En nombre de Dhankhar, Amit  
Kumar  
Enviado el: lunes, 6 de octubre de 2014 22:45  
Para: [gidlist at listas.cimne.upc.edu](http://listas.cimne.upc.edu/cgi-bin/mailman/listinfo/gidlist)  
Asunto: [GiDlist] GID move node feature?  
  
  
  
Hi,

Could you tell me if GID provides a feature so that I can move some specific  
nodes at specific distance for meshing purposes.  
Basically I am interested to model tet10 (quadratic tetrahedrals) mesh  
elements but nodes should be at (1/4)th distance rather than the default  
middle location in the region where my crack exists in the material. I know  
there is one “move node” feature but not really sure if that would suit my  
purpose. Is there any easy way to do this in GID?  
Would appreciate any help.

Thanks

-------------- next part --------------  
An HTML attachment was scrubbed…  
URL: [http://listas.cimne.upc.edu/pipermail/gidlist/attachments/20141007/de998426/attachment.htm](http://listas.cimne.upc.edu/pipermail/gidlist/attachments/20141007/de998426/attachment.htm)  
-------------- next part --------------  
A non-text attachment was scrubbed…  
Name: not available  
Type: image/png  
Size: 2026 bytes  
Desc: not available  
Url : [http://listas.cimne.upc.edu/pipermail/gidlist/attachments/20141007/de998426/attachment.png](http://listas.cimne.upc.edu/pipermail/gidlist/attachments/20141007/de998426/attachment.png)  
-------------- next part --------------  
A non-text attachment was scrubbed…  
Name: not available  
Type: image/jpeg  
Size: 68395 bytes  
Desc: not available  
Url : [http://listas.cimne.upc.edu/pipermail/gidlist/attachments/20141007/de998426/attachment.jpeg](http://listas.cimne.upc.edu/pipermail/gidlist/attachments/20141007/de998426/attachment.jpeg)

* * *

* * *

GiDlist mailing list  
[GiDlist at listas.cimne.upc.edu](http://listas.cimne.upc.edu/cgi-bin/mailman/listinfo/gidlist)  
[http://listas.cimne.upc.edu/cgi-bin/mailman/listinfo/gidlist](http://listas.cimne.upc.edu/cgi-bin/mailman/listinfo/gidlist)  
  
  
End of GiDlist Digest, Vol 51, Issue 4

* * *

-------------- next part --------------  
A non-text attachment was scrubbed…  
Name: macros.png  
Type: image/png  
Size: 118477 bytes  
Desc: macros.png  
Url : [http://listas.cimne.upc.edu/pipermail/gidlist/attachments/20141009/0eaa044f/attachment-0001.png](http://listas.cimne.upc.edu/pipermail/gidlist/attachments/20141009/0eaa044f/attachment-0001.png)

---

<div class="post-metadata">

**Author:** ![Dhankhar\_Amit\_Kumar](https://forum.gidsimulation.com/letter_avatar_proxy/v4/letter/d/c2a13f/32.png) [@Dhankhar\_Amit\_Kumar](https://forum.gidsimulation.com/u/Dhankhar_Amit_Kumar)\
**Post date:** [October 9, 2014, 5:27pm UTC](https://forum.gidsimulation.com/t/gidlist-invoking-and-editing-tcl-macros/1863/2 "2014-10-09T17:27:16Z")

</div>

Hi,

Got it. Never mind.

thanks

* * *

From: Dhankhar, Amit Kumar  
Sent: Thursday, October 09, 2014 12:24 PM  
To: [gidlist at listas.cimne.upc.edu](http://listas.cimne.upc.edu/cgi-bin/mailman/listinfo/gidlist)  
Subject: RE: Invoking and editing tcl macros

Hi,

Just a small follow up question- Which version of GID are you running? When I click the ‘Edit Macro’ button, I just see the macros listed and not the actual code. Could you let me know how can I can enable this so that I am able to edit any of the inbuilt tcl macros? Attached the screenshot of what I got.  
  
  
  
Thanks  
  
  
Today’s Topics:

1. Re: GID move node feature? (Enrique Escolano)  
  
\

* * *

Message: 1  
Date: Tue, 7 Oct 2014 14:49:26 +0200  
From: “Enrique Escolano” [escolano at cimne.upc.edu](http://listas.cimne.upc.edu/cgi-bin/mailman/listinfo/gidlist)  
Subject: Re: [GiDlist] GID move node feature?  
To: [gidlist at listas.cimne.upc.edu](http://listas.cimne.upc.edu/cgi-bin/mailman/listinfo/gidlist)  
Message-ID: 097e01cfe22d$20aa6f80$61ff4e80$@cimne.upc.edu  
Content-Type: text/plain; charset=“us-ascii”

You can move a mesh node for example as you said, from the menu

Mesh-Edit mesh-Move node

And then pick the node and enter its new x,y,z coordinates in the lower  
command line  
  
  
  
That internally is converted into this GiD process commands:  
  
  
  
MEscape Meshing EditMesh MoveNode $node\_id $x,$y,$z Escape  
  
  
  
Where node\_id is the node number, and x y z the new location  
  
  
  
And it exists also a more direct GiD-Tcl command:

GiD\_Mesh edit node $node\_id {$x $y $z}  
  
  
  
You can create a Tcl procedure to set the quadratic node position you want  
for all mesh nodes, and you can invoke this procedure in multiple ways

e.g. writing in the lower command line preceded by -np- your\_procedure  
(-np- mean ‘no process’ and then the next is expected to be a Tcl command)

of from a button of the ‘macros toolbar’  
  
  
  
In fact It already exists (hidden in the toolbar) a macro button very  
similar, to re-locate the quadratic nodes aligned in the middle edge (e.g.  
to avoid possible wrong jacobians in curved elements)  
  
  
  
Have a look to the Tcl code of this macro: click the “Edit macros” button to  
open the Macros window  
  
  
  
  
  
And select the ‘Align Quadratic Nodes’ macro to see its Tcl code on the  
right  
  
  
  
  
  
  
  
_From the window could set this macro visible in the toolbar or invoke it._  
  
  
You can clone this macro to create your similar macro changing a little the  
Tcl code to calculate the position you want instead of the mid-edge  
  
  
  
Enrique  
  
  
  
  
  
  
  
De: [gidlist-bounces at listas.cimne.upc.edu](http://listas.cimne.upc.edu/cgi-bin/mailman/listinfo/gidlist)  
[mailto:[gidlist-bounces at listas.cimne.upc.edu](http://listas.cimne.upc.edu/cgi-bin/mailman/listinfo/gidlist)] En nombre de Dhankhar, Amit  
Kumar  
Enviado el: lunes, 6 de octubre de 2014 22:45  
Para: [gidlist at listas.cimne.upc.edu](http://listas.cimne.upc.edu/cgi-bin/mailman/listinfo/gidlist)  
Asunto: [GiDlist] GID move node feature?  
  
  
  
Hi,

Could you tell me if GID provides a feature so that I can move some specific  
nodes at specific distance for meshing purposes.  
Basically I am interested to model tet10 (quadratic tetrahedrals) mesh  
elements but nodes should be at (1/4)th distance rather than the default  
middle location in the region where my crack exists in the material. I know  
there is one “move node” feature but not really sure if that would suit my  
purpose. Is there any easy way to do this in GID?  
Would appreciate any help.

Thanks

-------------- next part --------------  
An HTML attachment was scrubbed…  
URL: [http://listas.cimne.upc.edu/pipermail/gidlist/attachments/20141007/de998426/attachment.htm](http://listas.cimne.upc.edu/pipermail/gidlist/attachments/20141007/de998426/attachment.htm)  
-------------- next part --------------  
A non-text attachment was scrubbed…  
Name: not available  
Type: image/png  
Size: 2026 bytes  
Desc: not available  
Url : [http://listas.cimne.upc.edu/pipermail/gidlist/attachments/20141007/de998426/attachment.png](http://listas.cimne.upc.edu/pipermail/gidlist/attachments/20141007/de998426/attachment.png)  
-------------- next part --------------  
A non-text attachment was scrubbed…  
Name: not available  
Type: image/jpeg  
Size: 68395 bytes  
Desc: not available  
Url : [http://listas.cimne.upc.edu/pipermail/gidlist/attachments/20141007/de998426/attachment.jpeg](http://listas.cimne.upc.edu/pipermail/gidlist/attachments/20141007/de998426/attachment.jpeg)

* * *

* * *

GiDlist mailing list  
[GiDlist at listas.cimne.upc.edu](http://listas.cimne.upc.edu/cgi-bin/mailman/listinfo/gidlist)  
[http://listas.cimne.upc.edu/cgi-bin/mailman/listinfo/gidlist](http://listas.cimne.upc.edu/cgi-bin/mailman/listinfo/gidlist)  
  
  
End of GiDlist Digest, Vol 51, Issue 4

* * *

---

<div class="post-metadata">

**Author:** ![escolano](https://forum.gidsimulation.com/user_avatar/forum.gidsimulation.com/escolano/32/6_2.png) [@escolano](https://forum.gidsimulation.com/u/escolano)\
**Post date:** [October 9, 2014, 5:34pm UTC](https://forum.gidsimulation.com/t/gidlist-invoking-and-editing-tcl-macros/1863/3 "2014-10-09T17:34:39Z")

</div>

Click the lower-right blue arrow button to expand the ‘editing’ part of the  
macros window  
  
  
-----Mensaje original-----  
De: [gidlist-bounces at listas.cimne.upc.edu](http://listas.cimne.upc.edu/cgi-bin/mailman/listinfo/gidlist)  
[mailto:[gidlist-bounces at listas.cimne.upc.edu](http://listas.cimne.upc.edu/cgi-bin/mailman/listinfo/gidlist)] En nombre de Dhankhar, Amit  
Kumar  
Enviado el: jueves, 9 de octubre de 2014 19:24  
Para: [gidlist at listas.cimne.upc.edu](http://listas.cimne.upc.edu/cgi-bin/mailman/listinfo/gidlist)  
Asunto: Re: [GiDlist] Invoking and editing tcl macros  
  
  
Hi,

Just a small follow up question- Which version of GID are you running? When  
I click the ‘Edit Macro’ button, I just see the macros listed and not the  
actual code. Could you let me know how can I can enable this so that I am  
able to edit any of the inbuilt tcl macros? Attached the screenshot of what  
I got.  
  
  
  
Thanks  
  
  
Today’s Topics:

1. Re: GID move node feature? (Enrique Escolano)  
  
\

* * *

Message: 1  
Date: Tue, 7 Oct 2014 14:49:26 +0200  
From: “Enrique Escolano” [escolano at cimne.upc.edu](http://listas.cimne.upc.edu/cgi-bin/mailman/listinfo/gidlist)  
Subject: Re: [GiDlist] GID move node feature?  
To: [gidlist at listas.cimne.upc.edu](http://listas.cimne.upc.edu/cgi-bin/mailman/listinfo/gidlist)  
Message-ID: 097e01cfe22d$20aa6f80$61ff4e80$@cimne.upc.edu  
Content-Type: text/plain; charset=“us-ascii”

You can move a mesh node for example as you said, from the menu

Mesh-Edit mesh-Move node

And then pick the node and enter its new x,y,z coordinates in the lower  
command line  
  
  
  
That internally is converted into this GiD process commands:  
  
  
  
MEscape Meshing EditMesh MoveNode $node\_id $x,$y,$z Escape  
  
  
  
Where node\_id is the node number, and x y z the new location  
  
  
  
And it exists also a more direct GiD-Tcl command:

GiD\_Mesh edit node $node\_id {$x $y $z}  
  
  
  
You can create a Tcl procedure to set the quadratic node position you want  
for all mesh nodes, and you can invoke this procedure in multiple ways

e.g. writing in the lower command line preceded by -np- your\_procedure  
(-np- mean ‘no process’ and then the next is expected to be a Tcl command)

of from a button of the ‘macros toolbar’  
  
  
  
In fact It already exists (hidden in the toolbar) a macro button very  
similar, to re-locate the quadratic nodes aligned in the middle edge (e.g.  
to avoid possible wrong jacobians in curved elements)  
  
  
  
Have a look to the Tcl code of this macro: click the “Edit macros” button to  
open the Macros window  
  
  
  
  
  
And select the ‘Align Quadratic Nodes’ macro to see its Tcl code on the  
right  
  
  
  
  
  
  
  
_From the window could set this macro visible in the toolbar or invoke it._  
  
  
You can clone this macro to create your similar macro changing a little the  
Tcl code to calculate the position you want instead of the mid-edge  
  
  
  
Enrique  
  
  
  
  
  
  
  
De: [gidlist-bounces at listas.cimne.upc.edu](http://listas.cimne.upc.edu/cgi-bin/mailman/listinfo/gidlist)  
[mailto:[gidlist-bounces at listas.cimne.upc.edu](http://listas.cimne.upc.edu/cgi-bin/mailman/listinfo/gidlist)] En nombre de Dhankhar, Amit  
Kumar Enviado el: lunes, 6 de octubre de 2014 22:45  
Para: [gidlist at listas.cimne.upc.edu](http://listas.cimne.upc.edu/cgi-bin/mailman/listinfo/gidlist)  
Asunto: [GiDlist] GID move node feature?  
  
  
  
Hi,

Could you tell me if GID provides a feature so that I can move some specific  
nodes at specific distance for meshing purposes.  
Basically I am interested to model tet10 (quadratic tetrahedrals) mesh  
elements but nodes should be at (1/4)th distance rather than the default  
middle location in the region where my crack exists in the material. I know  
there is one “move node” feature but not really sure if that would suit my  
purpose. Is there any easy way to do this in GID?  
Would appreciate any help.

Thanks

-------------- next part --------------  
An HTML attachment was scrubbed…  
URL:  
[http://listas.cimne.upc.edu/pipermail/gidlist/attachments/20141007/de998426/](http://listas.cimne.upc.edu/pipermail/gidlist/attachments/20141007/de998426/)  
attachment.htm  
-------------- next part --------------  
A non-text attachment was scrubbed…  
Name: not available  
Type: image/png  
Size: 2026 bytes  
Desc: not available  
Url :  
[http://listas.cimne.upc.edu/pipermail/gidlist/attachments/20141007/de998426/](http://listas.cimne.upc.edu/pipermail/gidlist/attachments/20141007/de998426/)  
attachment.png  
-------------- next part --------------  
A non-text attachment was scrubbed…  
Name: not available  
Type: image/jpeg  
Size: 68395 bytes  
Desc: not available  
Url :  
[http://listas.cimne.upc.edu/pipermail/gidlist/attachments/20141007/de998426/](http://listas.cimne.upc.edu/pipermail/gidlist/attachments/20141007/de998426/)  
attachment.jpeg

* * *

* * *

GiDlist mailing list  
[GiDlist at listas.cimne.upc.edu](http://listas.cimne.upc.edu/cgi-bin/mailman/listinfo/gidlist)  
[http://listas.cimne.upc.edu/cgi-bin/mailman/listinfo/gidlist](http://listas.cimne.upc.edu/cgi-bin/mailman/listinfo/gidlist)  
  
  
End of GiDlist Digest, Vol 51, Issue 4

* * *

---

<div class="post-metadata">

**Author:** ![Viahn\_Parazee](https://forum.gidsimulation.com/letter_avatar_proxy/v4/letter/v/53a042/32.png) [@Viahn\_Parazee](https://forum.gidsimulation.com/u/Viahn_Parazee)\
**Post date:** [October 10, 2014, 11:53am UTC](https://forum.gidsimulation.com/t/gidlist-invoking-and-editing-tcl-macros/1863/4 "2014-10-10T11:53:15Z")

</div>

Hi  
I want to apply a gravity load to my structure. Does GiD take the density that I have specified in the material properties into account or do I have to assign a body load consisting of the unit weight of the material?  
Thank you  
-------------- next part --------------  
An HTML attachment was scrubbed…  
URL: [http://listas.cimne.upc.edu/pipermail/gidlist/attachments/20141010/12a531a3/attachment.htm](http://listas.cimne.upc.edu/pipermail/gidlist/attachments/20141010/12a531a3/attachment.htm)

---

<div class="post-metadata">

**Author:** ![escolano](https://forum.gidsimulation.com/user_avatar/forum.gidsimulation.com/escolano/32/6_2.png) [@escolano](https://forum.gidsimulation.com/u/escolano)\
**Post date:** [October 13, 2014, 8:54am UTC](https://forum.gidsimulation.com/t/gidlist-invoking-and-editing-tcl-macros/1863/5 "2014-10-13T08:54:18Z")

</div>

This kind of data must be defined by the problemtype,

GiD don’t define any material or its properties like density, young modulus,  
etc. It is the problemtype who define the conditions like ‘load’ and  
material

properties that are needed for its simulation.  
  
  
  
Which problemtype are you using? CompassFEM’s RamSolid maybe?

Then the density is defined in the material and then to consider the gravity  
load must assign the 'self weigth load to volumes (and then its material  
density is used)  
  
  
  
De: [gidlist-bounces at listas.cimne.upc.edu](http://listas.cimne.upc.edu/cgi-bin/mailman/listinfo/gidlist)  
[mailto:[gidlist-bounces at listas.cimne.upc.edu](http://listas.cimne.upc.edu/cgi-bin/mailman/listinfo/gidlist)] En nombre de Viahn Parazee  
Enviado el: viernes, 10 de octubre de 2014 13:53  
Para: [gidlist at listas.cimne.upc.edu](http://listas.cimne.upc.edu/cgi-bin/mailman/listinfo/gidlist)  
Asunto: [GiDlist] How to assign a gravity load (9810mm/s^s) in GiD  
  
  
  
Hi  
  
  
  
I want to apply a gravity load to my structure. Does GiD take the density  
that I have specified in the material properties into account or do I have  
to assign a body load consisting of the unit weight of the material?  
  
  
  
Thank you

-------------- next part --------------  
An HTML attachment was scrubbed…  
URL: [http://listas.cimne.upc.edu/pipermail/gidlist/attachments/20141013/b231ba01/attachment.htm](http://listas.cimne.upc.edu/pipermail/gidlist/attachments/20141013/b231ba01/attachment.htm)
