In triangle \( ABC \), the midsegment \( XY \) connects the midpoints of sides \( AB \) and \( AC \). A key property of midsegments in triangles is that the length of the midsegment is half the length of the side it is parallel to.
Since \( XY \) is parallel to \( BC \) and its length is given as 16 units, the length of side \( AC \) (which is the side parallel to the midsegment) can be calculated as follows:
\[ AC = 2 \cdot XY \]
Substituting the given value of \( XY \):
\[ AC = 2 \cdot 16 = 32 \text{ units} \]
Thus, the length of \( AC \) is
\[ \boxed{32} \text{ units.} \]