I am having difficulties creating turn restrictions in ArcObjects. I have found a way to Add a a network turn to restrictions through the
INetworkForwardStarEx.AddTurnRestriction() interface. But how to I create the INetworkTurn that this method takes.
INetworkTurn is a noncreatable object. You can only get it from querying an existing turn element. So if the turn you are trying to query does not yet exist, you will have to first create it.
Once you do have a turn, you will need to use INetworkQuery.QueryTurn and pass in the turn element ID as an argument.
This method will return INetworkTurn for you. You can then pass this value into INetworkForwardStarEx.AddTurnRestriction()
Hope this helps.
My guess is that you have to have to embed the ID for the from and to interior or exterior edges in the arc.object this creates.