GiD - The personal pre and post processor

Dimension

  
GiD_Dimension create|delete|edit|get|list <num>|append <data>
To create, delete, get data or list the identifiers of dimensions:

  • <num>|append: <num> is the entity identifier (integer > 0). You can use the word 'append' to set a new number automatically.
  • <data>: is all the dimension definition data, depending on each type (create) or a selection specification (delete, get or list):


create: to make new dimension

  • GiD_Dimension create <num>|append {<layer> <type> <text> <show_box> <more_data...>}

<type>: vertex distance angle radius text

<text>: the text to be showed

<show_box>: boolean 0|1 to hide or show a box around the text

  • GiD_Dimension create <num>|append {<layer> vertex <text> <show_box> <p_x p_y p_z> <text_x text_y text_z>}

<p_x p_y p_z> real coordinates of the vertex

<text_x text_y text_z> real space coordinates where the text is placed

  • GiD_Dimension create <num>|append {<layer> distance <text> <show_box> <p1_x p1_y p1_z> <p2_x p2_y p2_z> <text_x text_y text_z>}

<p1_x p1_y p1_z> and <p2_x p2_y p2_z> real coordinates of two vertex for a distance

  • GiD_Dimension create <num>|append {<layer> angle <text> <show_box> <vertex_x vertex_y vertex_z> <p1_x p1_y p1_z> <p2_x p2_y p2_z> <text_x text_y text_z>}

<vertex_x vertex_y vertex_z> real coordinates of the vertex corner for an angle dimension

  • GiD_Dimension create <num>|append {<layer> radius <text> <show_box> <p_arc_x p_arc_y p_arc_z> <center_x center_y center_z> <text_x text_y text_z>}

<p_arc_x p_arc_y p_arc_z> real coordinates of a point on the arc curve

<center_x center_y center_z> real coordinates of the arc center

  • GiD_Dimension create <num>|append {<layer> text <text> <show_box> <text_x text_y>}

<text_relative_x text_relative_y> real 2D coordinates of the text in screen, in a range from -1.0 to 1.0 (0.0, 0.0 is the center of the screen)


delete: to erase dimensions

  • GiD_Dimension delete <num>|<numa>:<numb>|layer:<layer_name>

<num> the integer id of the dimension to be deleted

<numa>:<numb> (the range from <numa> to <numb>, the word 'end' can be used  for numb, e.g. use 1:end to delete all)

layer:<layer_name> : to delete the dimensions of this layer


edit: to modify a dimension

  • GiD_Dimension edit <num> text|show_box|selected  <new_value>

<num> the integer id of the dimension to be modified

text <new_text> to modify the text shown by the dimension

show_box 0|1 to show or not the bow drawn around the text

selected 0|1 to be drawn in red when selected flag is true

get: to obtain all the dimension data to define a single entity

  • GiD_Dimension get <num> ?type|text|show_box|selected?

<num> the integer id of the dimension to get its data

the kind of data returned depends on the dimension type (see create command)

if the optional argument type, text or show_box is provided instead of all data it is returned only this information.


list: to get a list of dimension identifiers of a range or inside some layer

  • GiD_Dimension list ?<filter_flags>? ?<args>?

<filter_flags> could be: ?-count? ?-layer <layer_name>? ?-avoid_frozen_layers?

-count to return the amount of entities instead of the objarray with its ids

-layer <layer_name>to filter the selection and list only the entities with layer equal to <layer_name>

-avoid_frozen_layers to ignore the entities on layers frozen


<args>: <num>|<num_min>:<num_max>

<num_max> could be 'end' to mean the last index
if <args> is not provided it is considered as 1:end, and then all ids are returned


Examples:

Creation of a new dimension of text with the text "hello word" in the center-top of the screen, inside a layer named Layer0 that must exists

set new_id [GiD_Dimension create append {Layer0 text 1 "hello world" {0.0 1.0}}]

Get the list of ids of dimensions that belong to the layer Layer0

set ids [GiD_Dimension list -layer Layer0]


Get the list of all dimensions

set all_ids [GiD_Dimension list]


Get the information of the dimension id==2

GiD_Dimension get 2

Delete all dimensions

GiD_Dimension delete 1:end

COPYRIGHT © 2022 · GID · CIMNE