I think you're referring to a meeting point... if you are, that's defined in the xml.
<meeting-point value="true" image-path="../incantation_shrine/images/meeting_point.bmp"/>
(taken from Dark Magic's sorceress)
It's just a little different from the buildings because if you select a building and right click, it moves the meeting point. But if you have a person and right click, that's the command for moving to a new location. To use meeting point in such a situation, you need to click the meeting point button and then right click somewhere for the produced unit to "automatically" go to that location... hope that's clear enough