ArcObjects Library Reference (NetworkAnalyst)  

INALocationObject.QueryNALocation Method

Returns the network location.

[Visual Basic .NET]
Public Sub QueryNALocation ( _
    ByVal Location As INALocation _
)
[C#]
public void QueryNALocation (
    INALocation Location
);
[C++]
HRESULT QueryNALocation(
  INALocation* Location
);
[C++]

Parameters

Location [in]

  Location is a parameter of type INALocation

Product Availability

Available with ArcGIS Engine, ArcGIS Desktop, and ArcGIS Server. Requires Network Analyst Extension.

Remarks

Calling QueryNALocation populates the NALocation object that is passed in as a parameter with values found in the "SourceID", "SourceOID", "PosAlong", and "SideOfEdge" fields of the NALocationObject/NALocationFeature

Use this method rather than using the NALocation property when you aren't referencing multiple network locations and can use recycling semantics.  This will improve overall performance since fewer objects will need to be created.

If your feature is newly created, be sure to call IRowSubtypes.InitDefaultValues before retrieving the NALocation.

After setting INALocation properties on the retrieved NALocation, you must add the NALocation back to the INALocationObject in order for the changes to be reflected in the NALocationObject. You must also call Store on the IRow or IFeature interface in order for these changes to be saved in the database.

See Also

INALocationObject Interface