Skip to content

pydim.delete_dimension

fabian-flassig edited this page Aug 25, 2026 · 1 revision

Deletes dimensions from the model.

Similar to the Dimensions -> Delete function in the PYTHA user interface.

pydim.delete_dimension(dimension)
Parameter Type Description
dimension element_handle or {element_handle, ...} A single element handle of type "dimension" or a table of them.

Return value

Type Description
boolean true if at least one dimension was deleted, false otherwise.

Example:

local part = pytha.create_block(600, 400, 300)

local d = pydim.create_linear_dimension(
    {{0, 0, 0}, part}, {{600, 0, 0}, part},
    {type = "horizontal", view = "xy", distance = -50})

if d then
    pydim.delete_dimension(d)
end

Remarks:

  • Dimensions of the model only. Dimensions on plot sheets are not affected.
  • pytha.delete_element deletes parts, groups and NGOs; it does not accept dimension handles.

Version Support:

Minimum PYTHA Version: V27

See also:

pydim, pydim.create_linear_dimension, pydim.delete_text, element handles

Clone this wiki locally