How to Create a GiD Problem Type

2.PNG
Hello! Thank you. Just like the figure, I want to set the condition by choose the line “AB”, but it seems that only one element can be selected at once. In .cnd,

CONDITION: Line-Data
CONDTYPE: over lines
CONDMESHTYPE: over face elements
QUESTION: Boundary or not
VALUE: 0
END CONDITION

What’s more. For two-dimensional models, is it not possible to set boundaries over elements?
1.PNG
In .bas,

*Set Cond Surface-Data *elems
/discrete-element boundary *nelem
*loop elems
*Cond(1)    *\
*end elems

I repeat the same again, the normal way is to assign data to geometry, not to mesh!!
usual_assing_data_on_geometry.png
then generate the mesh. You can see drawing the condition by colors that the correct faces of the triangles are marked (note that they don’t exists line elements, only triangle elements
mesh_inherit_data.png
You can also directly assign to mesh faces, but is harder (but you can use all selection options)
manual_mesh_assign_data_unrecommended.png
And about the other comment: for a 2D model with triangles must not define a condition
CONDTYPE: over surfaces
CONDMESHTYPE: over face elements
Do you want to select the whole triangles themselves, must be ‘over body elements’ not ‘over face elements’ !!
(and the loop in the .bas to write it must be off course according to the kind of data)

It has sense to define a condition
CONDTYPE: over surfaces
CONDMESHTYPE: over face elements
if do you have a volume model, with tetrahedra, hexahedra, prisms or pyramids, and you are not also explicitly generating the boundary surface elements (triangles or quadrilaterals) and whan’t to attach the condition data to a face of a volume element (face 1 to 4 or a tetra, 1 to 6 of an hexa, etc.)
And in a volume mesh will be much better to assign data to geometric surfaces, do it manually on all mesh elements could be a nightmare.

Thanks for your help solved my problem! The reason that I assign data to mesh is that the mesh is imported from Abaqus to GID, so there is no geometry file here.