Select to view content in your preferred language

Adding parameters to network attribute

465
1
05-22-2012 10:50 PM
MuraliChoudari
Deactivated User
Hi,
    I am trying to automate create/build network dataset using SDK in C#. I followed the sample code : "http://help.arcgis.com/en/sdk/10.0/arcobjects_net/conceptualhelp/index.html#/d/0001000000w7000000.ht..." and able to create network dataset with simple attributes like oneway, meters and minutes. Now, my requirement is to add parameters to a network attribute say "xyz". I am not able to find documentation on this. It would be great if some example can be provided so that I can follow the same. Please provide some help on this. Thanks in advance..
Tags (2)
0 Kudos
1 Reply
PatrickStevens
Esri Contributor
Hello, Murali!

Network parameters are created as NetworkAttributeParameter objects and accessed via INetworkAttributeParameter. You will need to set up an IArray of parameters for the network attribute that you want to parameterize. Then you apply the IArray to the parameters setter of your attribute.

As for the VarType property of the parameter, here is a list of the int values you should apply for a given parameter type:

VT_EMPTY = 0, // uninitialized
VT_NULL = 1, // null
VT_I2 = 2, // short
VT_I4 = 3, // int
VT_R4 = 4, // float
VT_R8 = 5, // double
VT_DATE = 7, // DateTime
VT_BSTR = 8, // string
VT_BOOL = 11, // boolean
VT_UNKNOWN = 13, // object
VT_ARRAY = 0x2000 // array


If something here is unclear or doesn't work, please ask more questions. Thanks and good luck!
0 Kudos