By a ternary structure we mean an ordered pair $(U_0, T_0)$, where $U_0$ is a finite nonempty set and $T_0$ is a ternary relation on $U_0$. A ternary structure $(U_0, T_0)$ is called here a directed geodetic structure if there exists a strong digraph $D$ with the properties that $V(D) = U_0$ and \[ T_0(u, v, w)\quad \text{if} \text{and} \text{only} \text{if}\quad d_D(u, v) + d_D(v, w) = d_D(u, w) \] for all $u, v, w \in U_0$, where $d_D$ denotes the (directed) distance function in $D$. It is proved in this paper that there exists no sentence ${\mathbf s}$ of the language of the first-order logic such that a ternary structure is a directed geodetic structure if and only if it satisfies ${\mathbf s}$.